![]() |
Accelerator keys in CXTPMenuBar |
Post Reply ![]() |
Author | |
BobWansink ![]() Groupie ![]() ![]() Joined: 24 January 2008 Status: Offline Points: 59 |
![]() ![]() ![]() ![]() ![]() Posted: 04 February 2009 at 10:22am |
Hi all,
I'm using the commandbars in my CXTPFrameWnd derived window. Since I want to create the menubar myself, I won't be loading the menu from a resource (the CXTPCommandBar::LoadMenuBar() function), but from a CMenu * using CXTPCommandBar::LoadMenu(). Normally, my dialogs used CWnd::SetMenu() to create the menu, and adding an option with a String like: "New\tCtrl + N" would make a menu item with "New" as option name (aligned left) and "Ctrl + N" as it's shortcut key (aligned right). The LoadMenu function doesn't do this. Options with a tab in them are stripped of everything after the tab, so my users don't see the shortcut keys, only the option names. LoadMenuBar does show the Shortcuts. I assume you're using the accelleratorkeys for this(?). Is it possible to get the shortcuts in menu's using the LoadMenu function? Thanks a million! Bob |
|
Product: Xtreme ToolkitPro (MFC) version 13.0.0
Platform: Windows (32bit) - XP - Vista Language: Visual C++ |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Call pCommandBars->GetCommandBarsOptions()->bAutoUpdateShortcuts = FALSE;
but your users won't be able customize keys.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
BobWansink ![]() Groupie ![]() ![]() Joined: 24 January 2008 Status: Offline Points: 59 |
![]() ![]() ![]() ![]() ![]() |
Hi oleg.
Thanks! I wouldn't have found that in a million years... I'll try it out first thing tomorrow.
Bob
|
|
Product: Xtreme ToolkitPro (MFC) version 13.0.0
Platform: Windows (32bit) - XP - Vista Language: Visual C++ |
|
![]() |
|
Sergio ![]() Senior Member ![]() ![]() Joined: 18 September 2006 Status: Offline Points: 216 |
![]() ![]() ![]() ![]() ![]() |
Hi everyone.
Tested, it works. |
|
Sergio
|
|
![]() |
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 |