这两个函数返回的两个 CPoint 数值为什么不一样呢?

解决方案 »

  1.   

    前者坐标是Window,  后者是Client(工作区)
      

  2.   

    一个是窗口坐标,一个是屏幕坐标
    GetCursorPos
    The GetCursorPos function retrieves the cursor's position, in screen coordinates. CWnd::OnLButtonDown 
    point 
    Specifies the x- and y-coordinate of the cursor. These coordinates are always relative to the upper-left corner of the window. 
      

  3.   

    自己转换,ClientToScreen/ScreenToClient