Kryboard shortcut as caption in Menu |
Post Reply |
Author | |
rattana
Newbie Joined: 17 November 2009 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 17 November 2009 at 1:27am |
Hello I am trying to implement a pop up menu using CXTPcontrolpopUp and adding cxptcontrol to it . I need to append the keyboard shortcut associated with the cxtpcontrol.
the caption I gave is as below:-
"&New...\tCtrl+N"
SetCaption function of cxtpcontrol breaks the caption from "\t" and puts the caption as "New..." and the shortcut part is set as shortcuttextauto.
Is there any way I can get the caption of menu item as "&New...\tCtrl+N"
Thanks so much in advance
|
|
Smucker
Senior Member Joined: 02 February 2008 Status: Offline Points: 156 |
Post Options
Thanks(0)
|
You should let Codejock build the shortcut strings from the defined accelerators. This way is much easier than hard-coding them and handles customized keyboard shortcuts, which hard coding will not.
First, be sure to set this option in the CXTPCommandBars that hosts the popup: GetCommandBarsOptions()->bShowContextMenuAccelerators For using an regular accelerator resource (not designer shortcuts), you need to call: GetCommandBars()->GetShortcutManager()->SetAccelerators(ACCELERATOR_RESOURCE_ID); from the main frame's OnCreate(). Be sure to call it before loading the layout's user customizations. |
|
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)
Platform: Windows 200x/XP/Vista/Win7 (32/64 bit) Language: Visual C++ 9.0 (Studio 2008) |
|
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 |