在主框架中无法响应鼠标的事件。

解决方案 »

  1.   

    在CMainFrame中响应WM_MOUSEXXX事件
    不要在view中
      

  2.   

    It depends what kind of splitter you are using.By default, a message is sent to your application WindowProc(), then dispatched to your main frame, then sent to the child wnd. If your spppliters are views,or cwnds, you can override the OnCmdMsg( ) of the parent window of the splitters and force the message not to be sent to the splitters. If the splitters are dialogs, just remove the message handlers in those dialogs, and add a new one in their parent. Because dialogs can automatically reflect the message to the parent if there is no handler in itself. For more details, please see MSDN:Message Handling and Mapping Topics. (Sorry for using English, my Chinese support doesn't work well.)
      

  3.   

    (在CMainFrame中响应WM_MOUSEXXX事件) is not right. I have tested.
      

  4.   

    干脆采用另外的方法
    你自己几成一个CMyView:CView类,在这里对鼠标事件处理公共的响应事件
    然后将所有的View都从CMyView类继承,这样不就行了