struct ControlTableEntry {
int vk;
const char* name;
};
ControlTableEntry keyTable[] = {
{VK_LBUTTON, "Left mouse button"},
{VK_MBUTTON, "Middle mouse button"},
{VK_RBUTTON, "Right mouse button"},
{VK_TAB, "Tab"},
{VK_RETURN, "Enter"},
{VK_SHIFT, "Shift"},
{VK_LSHIFT, "Shift (left)"},
{VK_RSHIFT, "Shift (right)"},
{VK_CONTROL, "Control"},
{VK_LCONTROL, "Control (left)"},
{VK_RCONTROL, "Control (right)"},
{VK_MENU, "Alt"},
{VK_LMENU, "Alt (left)"},
{VK_RMENU, "Alt (right)"},
{VK_PAUSE, "Pause"},
{VK_ESCAPE, "Escape"},
{VK_SPACE, "Space"},
{VK_HOME, "Home"},
{VK_END, "End"},
{VK_UP, "Up arrow"},
{VK_DOWN, "Down arrow"},
{VK_LEFT, "Left arrow"},
{VK_RIGHT, "Right arrow"},
{VK_INSERT, "Insert"},
{VK_DELETE, "Delete"},
{'0', "0"},
{'1', "1"},
{'2', "2"},
{'3', "3"},
{'4', "4"},
{'5', "5"},
{'6', "6"},
{'7', "7"},
{'8', "8"},
{'9', "9"},
{'A', "A"},
{'B', "B"},
{'C', "C"},
{'D', "D"},
{'E', "E"},
{'F', "F"},
{'G', "G"},
{'H', "H"},
{'I', "I"},
{'J', "J"},
{'K', "K"},
{'L', "L"},
{'M', "M"},
{'N', "N"},
{'O', "O"},
{'P', "P"},
{'Q', "Q"},
{'R', "R"},
{'S', "S"},
{'T', "T"},
{'U', "U"},
{'V', "V"},
{'W', "W"},
{'X', "X"},
{'Y', "Y"},
{'Z', "Z"},
{VK_BACK, "Backspace"},
{VK_NUMPAD0, "Num pad 0"},
{VK_NUMPAD1, "Num pad 1"},
{VK_NUMPAD2, "Num pad 2"},
{VK_NUMPAD3, "Num pad 3"},
{VK_NUMPAD4, "Num pad 4"},
{VK_NUMPAD5, "Num pad 5"},
{VK_NUMPAD6, "Num pad 6"},
{VK_NUMPAD7, "Num pad 7"},
{VK_NUMPAD8, "Num pad 8"},
{VK_NUMPAD9, "Num pad 9"},
{VK_ADD, "Num pad Add"},
{VK_SUBTRACT, "Num pad Subtract"},
{VK_MULTIPLY, "Num pad Mulitply"},
{VK_DIVIDE, "Num pad Divide"},
{VK_DECIMAL, "Num pad Decimal"},
{VK_F1, "F1"},
{VK_F2, "F2"},
{VK_F3, "F3"},
{VK_F4, "F4"},
{VK_F5, "F5"},
{VK_F6, "F6"},
{VK_F7, "F7"},
{VK_F8, "F8"},
{VK_F9, "F9"},
{VK_F10, "F10"},
{VK_F11, "F11"},
{VK_F12, "F12"},
{-1, ""},
};[/code:2i1xmlg8]
5. It might help you to buy a C++ reference book or something like that to answer your questions about the language. #define with nothing after it means the given statement is removed (it is defined as nothing). Since you probably looked up its definition in the runtime configuration, and the runtime doesn't care about parameter definitions, it is simply removed. However, the IDE needs to know about parameters, so in the release configuration it is defined as a call to a function.