在你的非模式对话框接到消息后再发给你的对话框

WM_NCMOUSEMOVE 消息试试

解决方案 »

  1.   

    用CWnd::SetCapture()扑获到鼠标。
    不用时,用::ReleaseCapture()释放鼠标。
    这样便可以在mousemove事件中知道鼠标在移动了
      

  2.   

    当然不难,建个timer,比较开始时间和end时间的mouse(X,Y)是否一样,当然有漏洞,但如果你timer的间隔取的合适(不一定很小)应该可以
      

  3.   

    用CWnd::SetCapture()扑获到鼠标。
    不用时,用::ReleaseCapture()释放鼠标。
    这样便可以在mousemove事件中知道鼠标在移动了
      

  4.   

    只能要消息了,如果在cb,delphi中的话就好办了,可以在onmousemove事件中判定!!
      

  5.   

    stoneant1()  pandalittle(熊猫儿) :
     我在非模式对话框移动鼠标,主对话框的鼠标移动消息还是不知道
      

  6.   

    CWnd::SetCapture()
    这局势必须的吗?
      

  7.   

    在主对话框cpp中的OnMouseMove()函数中,需要得到子对话框消息时,SetCapture();就行了,别忘了及时ReleaseCapture();
      

  8.   

    参照alexzhou(菜刀)说的,非模式对话框将获得的鼠标移动消息再Post给父窗口。
      

  9.   

    yu_hl(卖柴火的小男孩):
    还有其他方法吗?
      

  10.   

    暂时没有。SetCapture在这种情况下不太中用。
    Only the foreground window can capture the mouse. When a background window attempts to do so, the window receives messages only for mouse events that occur when the cursor hot spot is within the visible portion of the window.
      

  11.   

    yu_hl(卖柴火的小男孩) 
    3Q