   Questions about Mouse Input
  I get my keyboard input through WndProc, and I want to do the same for mouse input. What's the WM_ event for a mouse click? And how do I get the position of my mouse? Thanks.   
  Check out Mouse Input at MSDN.;  Ah, awesome, thx =). Another question. Is there a way to "fake" a mouse click. Like if I wanted to make an autoclick program. How would I do that?   ;  you can send windows any message you want.  Though i'm not sure of the exact syntax. I think it's SendMessage(windows junk) or PostMessage(windows junk);So your code would goif (condition to send mouse click)SendMessage(send mouse click message)And then handle the message in your message handler.   ;  Ah cool thx. =)   ;  Ah crap. I got a new problem. By clicking around on the links at the page Dave Hunt directed me to, I found this function, SendInput, that basically "fakes" an input event. In my case, I want to "fake" a mouse click event. Well the problem is, I need to give it an INPUT structure that contains the info about the input I want to fake. Well after filling out my INPUT structure's information, I tried to compile it but it gives me this along with a bunch of other errors:C:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(30) : error C2065: 'INPUT' : undeclared identifierSo at first I thought I just needed to include whatever header file had it declared. So I looked around and it said it's declared in the winuser.h file, which is included into windows.h. Which I have included, since it's a windows program... Can anyone tell me why the stupid thing still thinks it's not declared? Thanks.Dont know if it will help, but full error list is below, along with the code that's causing the problem://Problem-causing code:INPUT MouseClick; MouseClick.type = INPUT_MOUSE;MouseClick.mi.mouseData = 0;MouseClick.mi.time = 0;MouseClick.mi.dwFlags = MOUEEVENTF_LEFTDOWN;MouseClick.mi.dx = 0;MouseClick.mi.dy = 0; MouseClick.mi.dwExtraInfo = GetMessageExtraInfo();SendInput(1, &MouseClick, sizeof(INPUT));//Errors:--------------------Configuration: Autoclick Test - Win32 Debug--------------------Compiling...Autoclick Test.cppC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(30) : error C2065: 'INPUT' : undeclared identifierC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(30) : error C2146: syntax error : missing ';' before identifier 'MouseClick'C:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(30) : error C2065: 'MouseClick' : undeclared identifierC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(31) : error C2228: left of '.type' must have class/struct/union typeC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(31) : error C2065: 'INPUT_MOUSE' : undeclared identifierC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(32) : error C2228: left of '.mi' must have class/struct/union typeC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(32) : error C2228: left of '.mouseData' must have class/struct/union typeC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(33) : error C2228: left of '.mi' must have class/struct/union typeC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(33) : error C2228: left of '.time' must have class/struct/union typeC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(34) : error C2228: left of '.mi' must have class/struct/union typeC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(34) : error C2228: left of '.dwFlags' must have class/struct/union typeC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(34) : error C2065: 'MOUEEVENTF_LEFTDOWN' : undeclared identifierC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(35) : error C2228: left of '.mi' must have class/struct/union typeC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(35) : error C2228: left of '.dx' must have class/struct/union typeC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(36) : error C2228: left of '.mi' must have class/struct/union typeC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(36) : error C2228: left of '.dy' must have class/struct/union typeC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(37) : error C2228: left of '.mi' must have class/struct/union typeC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(37) : error C2228: left of '.dwExtraInfo' must have class/struct/union typeC:\Documents and Settings\Owner\Desktop\Icon Folder\OpenGL Programming Stuff\Autoclick Test\Autoclick Test.cpp(38) : error C2065: 'SendInput' : undeclared identifierError executing cl.exe.Autoclick Test.exe - 19 error(s), 0 warning(s)