MAPVK_VK_TO_VSC is a simple #define MAPVK_VK_TO_VSC (0)
, not even a constant, so it should be resolved on the preprocessing stage.
Either you've missed to include "winuser.h" before this code (in that case MapVirtualKey and VK_ constants will be undeclared too), or you have undefined WIN_VER somewhere (or defined it less than 0x400). Sometimes it's easy to forget that WIN_VER must be defined in hex, and with something like #define WINVER 500, you've got version less than 2.0