WM_LBUTTONUP这个事件中point坐标是相对于整个窗口的左上角而言,而GetDC的设备上下文怎是相对于客户区的坐标而言,想再放松鼠标的位置画个点,如何得到该点相对于客户区左上角的坐标?如何得到窗口客户区左上角的屏幕坐标?

解决方案 »

  1.   

    point 
    Specifies the x- and y-coordinate of the cursor. These coordinates are always relative to the upper-left corner of the window. 
    不是的啊,这是相对于窗口的啊.
      

  2.   

    point 
    Specifies the x- and y-coordinate of the cursor. These coordinates are always relative to the upper-left corner of the window. 
    不是的啊,这是相对于窗口的啊.======================
    窗口是什么窗口呢?其实就是你的客户窗口。也就是客户区的坐标了。所以,WM_LBUTTON_DOWN是没有错的。GetDC也是客户区坐标。自己多试试就可以了。