Accelerators |
Post Reply |
Author | |
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
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
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Have to. Check may be you set bAutoUpdateShortcuts to False ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
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 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
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
|
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
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
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Have to be
pCommandBars->GetCommandBarsOptions()->bAutoUpdateShortcuts = TRUE
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
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
|
|
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 |