Command Routing to panes |
Post Reply |
Author | |
Bart6
Groupie Joined: 22 March 2009 Location: Belgium Status: Offline Points: 20 |
Post Options
Thanks(0)
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); } |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Check Samples\DockingPane\ActivePaneView sample.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Albertb
Newbie Joined: 08 July 2009 Status: Offline Points: 6 |
Post Options
Thanks(0)
|
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++ |
|
Marcus
Groupie Joined: 04 June 2006 Location: Germany Status: Offline Points: 42 |
Post Options
Thanks(0)
|
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.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |