Reputation: 9925
I’m currently writing an MFC dialog app which has a menu. The menu displays correctly and the menu entries work correctly via mouse, accelerators, and hotkeys (e.g., to quit: Ctrl+Q or Alt+F,Q).
Unfortunately, the Enter key doesn’t seem to work. That is, pressing Alt+F will open the File menu and pressing ↑ will highlight the Quit entry, but pressing Enter will not select it.
I know that using menus in dialog apps can be a bit tricky, but I’ve done this successfully before. However, that was a long time ago with a customized VS wizard, so I am trying to remember how to do this from scratch. I tried checking my old code, but could not find anything in reference to VK_RETURN
. (No, there’s nothing special in PreTranslateMessage
.)
These two questions are related, but they want the dialog to receive the key, I need the menu to get it.
Does anyone know what the problem is and how to fix it?
Upvotes: 1
Views: 148