Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with keyboard shortcuts & accelerators

Status
Not open for further replies.

qedusa

Programmer
Jan 12, 2002
43
US
Hi, I'm having trouble assigning keyboard shortcuts and accelerators to a menu I've created.
I've created a menu resource and an accelerator resource. I choose the menu item ID in the accelerator resource and assign a keycode character.
When I choose ClassWizard it detects I have inserted the accelerator resource and asks me if I want to use an existing class or create a new one.
Where do I go from here?

I've tried attaching to the existing class and I've tried creating a new one but don't know what base class I should use.
Can anyone help? The shortcuts do not work either way.
 
A easy way to add accelerators for Menu - add a '&' in menu properties before letter You wish to use as accelerator for this Item, for example:
&New Window for Menu Item 'New Window' with ID IDM_NEW_WINDOW. Visual Studio will create a shortcut 'Ctrl + N' for this Menu item automatically. Or do You wish to use a special Accelerators?
 
Yep! Tried that - it doesn't work. I should mention this is a custom menu I've stuck in a dialog. Therefore the accelerator appears to have no effect.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top