   WM_LBUTTON_DOWN Error
  Hey guys,Simple problem that seems impossible to find.I am trying to detect when the mouse button is clicked using the WM_LBUTTON_DOWN message but I am getting the error: C2065: "WM_LBUTTON_DOWN" : undeclared identifierNow I believe the issue is that I have to either include a header file or do something similar to detecting keyboard input and define something for example:#define KEY_DOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0)#define KEY_UP(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 0 : 1)So the question is what do I have to include or define to get the WM_LBUTTON_DOWN messages to be recognized?Thanks in advance!   
  You need to include windows.h WM_KEYUP/WM_KEYDOWN are sent to the applications Window Message handler. They dont need calls to GetKeyAsync. You can do it that way if you want but....   ;  hhhmm I have included windows.h... is there anything else that I need?   ;Because it's WM_LBUTTONDOWN.  Notice there is no underscore between "LBUTTON" and "DOWN".  empirical2 makes a good point though.  You should probably be handling this (and other things) in your message handler.   ;  Yep that was the problem thanks for that Mike! dodgy example ggrrr   