我的程序中加入了鼠标事件,如:LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled),请问如何从参数中得到鼠标的位置POINT呢?谢谢

解决方案 »

  1.   

    WM_MOUSEMOVE
    The WM_MOUSEMOVE message is posted to a window when the cursor moves. If the mouse is not captured, the message is posted to the window that contains the cursor. Otherwise, the message is posted to the window that has captured the mouse. WM_MOUSEMOVE 
    fwKeys = wParam;        // key flags 
    xPos = LOWORD(lParam);  // horizontal position of cursor 
    yPos = HIWORD(lParam);  // vertical position of cursor 
     
      

  2.   

    wParam参数中是键盘的按键信息