Where is ALT key defined?

Need to do this:
::SendMessage(hwnd, WM_KEYDOWN, VK_ALT,0);

Compiler says:
C:\MyInspect\MyMain.cpp|155|error: 'VK_ALT' was not declared in this scope|

Any include needed? Which one?

Thanks a lot
Alex
Env: Win7, Mingw, Wxwidgets 3
Last edited on
Nowhere. There is no VK_ALT.

You want VK_MENU.

See this page for valid virtual key codes:

http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx


Note: for VK_MENU, you only need to #include <Windows.h>


EDIT:

also... sending phony keydown messages is questionable. But whatever.
Last edited on
This is for a kind of robot app for gui stress testing. I need to send alt f1
Topic archived. No new replies allowed.