Home > Software engineering >  How to get the mouse to click the menu item ID
How to get the mouse to click the menu item ID

Time:09-18

Requirements: in the App, there are two top-level menu item (not a popup menu), mouse the left key click on any menu item, get his ID
Example App=notepad. Exe
The known conditions: the CWnd * PWND

CodePudding user response:

Click the menu item will send WM_COMMAND messages commonly, so consider SetWindowsHookEx Hook WH_GETMESSAGE or WH_CALLWNDPROC

  • Related