views:

904

answers:

4

For example VK_LEFT, VK_DELETE, VK_ESCAPE, VK_RETURN, etc. How and where are they declared? Are they constants, #defines, or something else? Where do they come from?

If possible, please provide a file name/path where they are declared. Or some other info as specific as possible.

+2  A: 

These are declared using #define in the file winuser.h in the Platform SDK. In my installation of Visual Studio 2008, the full path is

C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\WinUser.h
ChrisN
A: 

These are macro-defined constants, declared in winuser.h. To find where something is declared or defined you can read its documentation (Microsoft includes a section at the end, in Unix man pages it appears in the beginning), or go to the directory where the headers are and grep for the thing you're looking for.

Diomidis Spinellis
+2  A: 

To find how something is declared, install Visual Assist, put the cursor over the identifier in you code and press Alt+G
Or, right click over the identifier and choose "Go To Definition"
Or press F12

shoosh
+1  A: 

There are also online copies of winuser.h , very handy sometimes :

http://www.woodmann.com/fravia/sources/WINUSER.H http://doc.ddart.net/msdn/header/include/winuser.h.html

A bit of googling will get you more of those.

QBziZ