I have a MDI app, with CView based on CEditView, and in CMainFrame, I have a CDockablePane where I stretched a CRichEditCtrl. Everything goes well, except that messages from CMyDockablePane is routed to CMyEditView, so it is not what I want, if the focus is on CMyDockablePane.
In detail, if I go to CMyDockablePane, and try to do a "Paste", the "Paste" operation is done it in CMyEditView.
An interesting thing: If I do "Ctrl+Shift+V", then the "Paste" operation is done in CMyDockablePane.
My Question is, how can I route MFC commands from CMyEditView to CMyDockablePane, if I got the focus inside my CMyDockablePane ?
I have tried this:
Code:
BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
// TODO: Add your specialized code here and/or call the base class
if (m_wndClassView.OnCmdMsg(nID, nCode, pExtra, pHandlerInfo)) // m_wndClassView is my CMyDockablePane
return TRUE;
return CMDIFrameWndEx::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
Didn't worked. I have attached here a sample project:
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.