在mfc中程序中,在OnMouseMove函数中响应鼠标左键消息,鼠标左键消息调用函数OnMouseActivate,但我不太明白OnMouseActivate函数中的三个参数各自表示什么,我项知道在OnMouseMove函数中如何获取pDesktopWnd, nHitTest, message这三个参数。

解决方案 »

  1.   

    afx_msg int OnMouseActivate(
       CWnd* pDesktopWnd,
       UINT nHitTest,
       UINT message 
    );
     Parameters
    pDesktopWnd
    Specifies a pointer to the top-level parent window of the window being activated. The pointer may be temporary and should not be stored. nHitTest
    Specifies the hit-test area code. A hit test is a test that determines the location of the cursor. message
    Specifies the mouse message number. 
    一般不直接调用消息响应函数的
      

  2.   

    我的程序是画图程序,左键按下拖动时支持片选,画图功能是在OnMouseActivate函数中,需要要在OnMouseMove函数中响应左键消息,然后消息调用OnMouseActivate函数。