![]() |
Toolbar docking pane focus |
Post Reply ![]() |
Author | |
markr ![]() Senior Member ![]() Joined: 01 August 2004 Status: Offline Points: 443 |
![]() ![]() ![]() ![]() ![]() Posted: 28 January 2010 at 10:41am |
Hello,
We're currently making use of several toolbars within docking panes, and have noticed that clicking a button within a toolbar does not give focus to the parent docking pane. This is a problem in our case because we have a pop-up menu in our toolbar, and it has accelerators associated with it. The accelerators won't fire until the docking pane has focus. Is there any way to have the docking panel receive focus when a user clicks within its toolbar? |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
I guess you could override OnCmdMsg and make sure the command is routed to that pane. E.g.
CMainFrame::OnCmdMsg(...)
{
if (m_paneWithToolbar.OnCmdMsg(...))
return TRUE;
return ::OnCmdMsg(...);
}
However, this could yield problems if your command is handled in different places. Usually, only the active window shall have a crack at the command.
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
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 |