Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Command Routing to panes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Command Routing to panes

 Post Reply Post Reply
Author
Message
Bart6 View Drop Down
Groupie
Groupie
Avatar

Joined: 22 March 2009
Location: Belgium
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bart6 Quote  Post ReplyReply Direct Link To This Post Topic: Command Routing to panes
    Posted: 11 May 2009 at 4:59am
Hi all,

I have an application that uses Panes (copied from the Ribbon sample). I want the panes to be able to react to commands from the ribbon, so i put a OnCmdMsg handler in the mainframe that gives the panes a shot at the commands, before they are send through the regular handler. (see code below)

So here is the question: is this the right approach?

Thanks
Bart



BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
   // We want to pane to also be able to react to commands.
   if (m_paneScenes.OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
      return TRUE;

   return __super::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
Back to Top
Oleg View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2009 at 2:15am
Hi,
 
Check Samples\DockingPane\ActivePaneView  sample.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Albertb View Drop Down
Newbie
Newbie
Avatar

Joined: 08 July 2009
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albertb Quote  Post ReplyReply Direct Link To This Post Posted: 08 July 2009 at 9:59am
Can someone please point me to that sample in a clearer way.  Probably my stupidity but I can't find it anywhere!  Many thanks.

Yup!  True to form, it was my stupidity.  I've got it now thanks, no need to reply unless to be scalding and scathing
Xtreme Toolkit Pro 2007
Win 32
Visual C++
Back to Top
Marcus View Drop Down
Groupie
Groupie


Joined: 04 June 2006
Location: Germany
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marcus Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2010 at 8:55am
Why isn't this build in?
DockingPaneManager should simply route to the active pane, if there is one,
and a pane should route to its child window, if there is one.
Then the frame window could just call panemanager.OnCmdMsg.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.063 seconds.