Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Accelerators
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Accelerators

 Post Reply Post Reply
Author
Message
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Topic: Accelerators
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 27 September 2007 at 2:57pm
Have to. Check may be you set bAutoUpdateShortcuts to False ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1072
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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 15.3.1, new Projects v 18.5.0
Platform: Windows 8.1 (64bit)
Language: VC+
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2007 at 5:59am
Hi,
 
Have to be
pCommandBars->GetCommandBarsOptions()->bAutoUpdateShortcuts = TRUE
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.