Print Page | Close Window

Accelerators

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=8190
Printed Date: 19 April 2024 at 8:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Accelerators
Posted By: Simon HB9DRV
Subject: Accelerators
Date Posted: 27 September 2007 at 10:33am
I have loaded my own accelerator table using:

GetCommandBars()->GetShortcutManager()->SetDefaultAccelerator(hAccelTable);
The accelerators work but the shortcuts are not shown in the menus. What should I do?


-------------
Simon HB9DRV



Replies:
Posted By: Oleg
Date Posted: 27 September 2007 at 2:57pm
Have to. Check may be you set bAutoUpdateShortcuts to False ?

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: mgampi
Date Posted: 27 September 2007 at 3:01pm
Hi Simon;
I'm not absolutely sure, but I think I had to remove the commandbar registry keys of the application to activate the display of my own shortcut keys after inserting the SetDefaultAccelerator() function call.
I also call GetShortcutManager()->UseSystemKeyNameText(TRUE) immediately after this call, so I don't exactly know which one finally succeeded, but my shortcut keys are shown.


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: Simon HB9DRV
Date Posted: 28 September 2007 at 4:39am
Hi,
 
Thanks for the replies. The shortcuts work, are displayed in tooltips but not in menu text.
 
Here's what I am currently using:
 
pCommandBars->GetShortcutManager()->SetDefaultAccelerator(hAccelTable);
pCommandBars->GetShortcutManager()->UseSystemKeyNameText(TRUE);
pCommandBars->GetCommandBarsOptions()->bAutoUpdateShortcuts = FALSE;



-------------
Simon HB9DRV


Posted By: Simon HB9DRV
Date Posted: 28 September 2007 at 4:44am
Originally posted by Simon HB9DRV Simon HB9DRV wrote:

Hi,
 
Thanks for the replies. The shortcuts work, are displayed in tooltips but not in menu text.
 
Here's what I am currently using:
 
pCommandBars->GetShortcutManager()->SetDefaultAccelerator(hAccelTable);
pCommandBars->GetShortcutManager()->UseSystemKeyNameText(TRUE);
pCommandBars->GetCommandBarsOptions()->bAutoUpdateShortcuts = FALSE;

 
One thing - I do NOT switch the menu as frames are selected - the same menu is used throughout the program.
 
I guess I just need to be able to tell Codejock to draw the menu with my shiny new shortcuts.


-------------
Simon HB9DRV


Posted By: Oleg
Date Posted: 28 September 2007 at 5:59am
Hi,
 
Have to be
pCommandBars->GetCommandBarsOptions()->bAutoUpdateShortcuts = TRUE


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Simon HB9DRV
Date Posted: 28 September 2007 at 6:12am
Thanks Oleg,
 
I misunderstood your previous message, all works 100%.
 
Idiot user error (as always), have a nice weekend, I now have to play with ORACLE  !


-------------
Simon HB9DRV



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