Wm_Command Accelerator

Wm_Command Accelerator



If an accelerator keystroke occurs that corresponds to a menu item when the window that owns the menu is minimized, no WM_COMMAND message is sent. However, if an accelerator keystroke occurs that does not match any of the items in the window’s menu or in the window menu, a WM_COMMAND message is sent, even if the window is minimized.


The W M_COMMAND message includes an identifier that the window procedure examines to determine the source of the message. If an accelerator generated the WM_COMMAND message, the identifier is that of the accelerator. Similarly, if a menu item generated the WM_COMMAND message, the identifier is that of the menu item. Because an accelerator provides a shortcut for choosing a.


When an accelerator is used , the window specified in the TranslateAccelerator function receives a WM_COMMAND or WM_SYSCOMMAND message. The low-order word of the wParam parameter contains the identifier of the accelerator. The window procedure examines the identifier to determine the source of the WM_COMMAND message and process the message accordingly.


3/2/2006  · The one-line summary of the WM_COMMAND message says, “The WM_COMMAND message is sent when the user selects a command item from a menu, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated.”, About Keyboard Accelerators – Win32 apps | Microsoft Docs, WM _ COMMAND message (Winuser.h) – Win32 apps | Microsoft Docs, About Keyboard Accelerators – Win32 apps | Microsoft Docs, TranslateAcceleratorA function (winuser.h) – Win32 apps …


According to Spy++, it’s being sent as a WM_COMMAND message – but also according to Spy++, the message isn’t being sent to the CHtmlView object, but rather to the Internet Explorer_Server (or IWebBrowser2) object that it wraps. The WM_COMMAND message in question is not seen in any other parent objects (I’ve found this by observation and via Spy++).


Keyboard accelerators are key combinations that generate WM_COMMAND (or, in some cases, WM_SYSCOMMAND) messages. Most often, programs use keyboard accelerators to duplicate the action of common menu options, but they can also perform nonmenu functions.

Advertiser