Why isn't this working?
Macros:
Global variables:Code:#define KEYDOWN ( vKey ) ( ( GetAsyncKeyState ( vKey ) & 0x8000 ) ? TRUE : FALSE ) #define KEYUP ( vKey ) ( ( GetAsyncKeyState ( vKey ) & 0x8000 ) ? FALSE : TRUE )
Code:Code:int vKey;
Error:Code:if ( KEYDOWN ( VK_ESCAPE ) ) SendMessage ( hWnd, WM_CLOSE, 0, 0 );
It works fine without the use of macros. What am I doing wrong?Code:Error 1 error C2064: term does not evaluate to a function taking 1 arguments 161
Thanks.