Print Page | Close Window

Toolbar docking pane focus

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=16097
Printed Date: 03 July 2024 at 4:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Toolbar docking pane focus
Posted By: markr
Subject: Toolbar docking pane focus
Date 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?



Replies:
Posted By: znakeeye
Date Posted: 29 January 2010 at 6:18am
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/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net