怎样才能在正常的客户区绘图?我老是画在Toolbar上?
怎样得到应用程序相对于屏幕左上角的坐标?
谢谢

解决方案 »

  1.   

    那肯定你的dc不对啦!getclientrect(&rect);
    clienttoscreen(&rect);
    rect.left和rect.top是左上角坐标!
      

  2.   

    WINDOWPLACEMENT placement;
    m_FramCtrl.GetWindowPlacement(&placement);
    m_FramRect = placement.rcNormalPosition;
    CRect rect;
    GetDlgItem(IDC_STATIC_FRAM)->GetWindowRect(&rect);
    CRect MainRect;
    GetWindowRect(&MainRect);
      

  3.   

    CRect rect;
    GetClientRect(&rect);
    int x=rect.left;
    int y=rect.top;
      

  4.   

    CRect rcScreen;
    GetWindowRect(rcScreen);
    //rcScreen.TopLeft()就是相对于屏幕左上角的坐标
      

  5.   

    我想你在使用画图的时候,实在框架中,改为在视图就可以了,在CView中画