CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #2
    Join Date
    Jan 2009
    Posts
    399

    Re: Routing messages from CView to CDockablePane

    P.S. I already read this article: https://www.codeproject.com/articles...-cdockablepane

    And I have applied that solution (simplified):
    Code:
    BOOL CMainFrame::OnCmdMsg(UINT id,int code , void *pExtra,AFX_CMDHANDLERINFO* pHandler)
    {
      //route cmd first to registered dockable pane
      POSITION pos = m_regCmdMsg.GetHeadPosition();
      while (pos)
      {
        CBasePane* pane = m_regCmdMsg.GetAt(pos);
        if(pane->IsVisible() &&
        pane->OnCmdMsg(id,code,pExtra,pHandler))
                                return TRUE;
        m_regCmdMsg.GetNext(pos);
      }
      return CFrameWndEx::OnCmdMsg(id,code,pExtra,pHandler);
    }
    but still not working.
    Last edited by mesajflaviu; July 2nd, 2021 at 12:11 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured