Language: C++
Development Environment: Microsoft Visual C++
Libraries Used: MFC
Problem: Should be a fairly simple question. I’m trying to add in hotkey key-combinations to my menu for various items (Save, Open, etc.). Usually a menu will say something like “Save” (left-justified) and then Ctrl – S (right-justified). How do I accomplish this? Do I just use spaces in my caption, or is there a specific way to do this?
Use a tab character to separate the command text from the hotkey text:
(Note that this only affects the text of the menu – to actually make the hotkey work, you need to add it to your accelerator table.)