I want to add a keyboard shortcut to an MFC SDI application in Visual Studio 2010. Here is what I do:
- Add the desired key as virtual key to the Accelerator Ressource (e.g. VK_SPACE with ID ID_NEWGAME)
- Connect an event handler for COMMAND to ID_NEWGAME in class CMyGameView
- Test by trying to stop inside the event handler using the debugger
Result: The program does not react when I hit the space key.
In Visual Studio 6.0, however, the same procedure works as expected.
What am I missing?