你事先已经接到MouseDown事件了,还没有接到MouseUp,对吧

解决方案 »

  1.   

    在鼠标移动的过程中,你可以不停的接收到 WM_MOUSEMOVE 消息,
    在这个消息中的第一个参数 fwKeys ,在 MSDN 中的解释如下:
    fwKeys 
    Value of wParam. Indicates whether various virtual keys are down. 
    This parameter can be any combination of the following values: Value Description 
    MK_CONTROL Set if the ctrl key is down. 
    MK_LBUTTON Set if the left mouse button is down. 
    MK_MBUTTON Set if the middle mouse button is down. 
    MK_RBUTTON Set if the right mouse button is down. 
    MK_SHIFT Set if the shift key is down. 
    你现在只需要判断 (dwKeys | MK_LBUTTON) 为真,就可以判断左键是否按下。
    同理你也可以判断其它的键是否被按下。