TranslateAccelerator and Disabled Menu Items
问题 In my application, I'm enabling/disabling menu items based on context - and if a text area has focus, I disable accelerators that would conflict with the navigation keys (e.g. Ctrl-Left/Right). According to Microsoft's documentation: If an accelerator has the same identifier as a menu item and the menu item is grayed or disabled, the accelerator is disabled and does not generate a WM_COMMAND or WM_SYSCOMMAND message. However, if the associated menu accelerator is still in the accelerator