I'm trying to make an application that captures selection of context menu items and up until now I've had windows.h included and it seemed to work fine, but for some reason I'm getting an error "WM_MENUCOMMAND was not declared in this scope". I am on windows xp so I meet the minimum system requirements as indicated by MSDN , I figure theres no reason it shouldn't work. How do I get WM_MENUCOMMAND to work?
WM_MENUCOMMAND
is defined in winuser.h
(which windows.h
includes), but only when WINVER
is >= 0x0500
and _WIN32_WCE
is not defined. So you likely have WINVER
set too low. It is set to 0x0500
by default, so something in your project must be redefining it to a lower value.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.