   Problem with SendInput and AnimateWindow
  I'm trying to use SendInput to "fake" a mouse click event. Here's the code where I call the function: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));When I try to compile this, the compiler acts like INPUT was never declared. Or any of the other structures or functions declared in winuser.h. Although it certainly acted like it knew it was declared when I was typing it since it brough up that little window with the variables and methods in it when I hit '.'.Also, after not being able to figure out what was wrong, I went looking around on MSDN and found a function I wanted to try, AnimateWindow. When I tried to compile the program after calling AnimateWindow, it gave me similar errors. So I checked, and, yeah, it's also declared in winuser.h. winuer.h is include in windows.h which I have included. Also, I've dried directly including winuser.h into my main cpp file and it just won't work. I can't figure out why it doesn't recognize these structures and functions. Maybe it has something to do with my project settings? I really don't know (Since I don't know what about 80-90% of them do anyway). I have no idea where to begin looking for the error, so I would be eternally grateful if anyone could give me some suggestions as to what might be wrong, or better yet, a solution. =) Below is a full list of the errors generated when I try to compile my program with the above code:--------------------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)EDIT: Also, here is where I read about SendInput on MSDN and here is where I read about AnimateWindow. I'm not particularly sure I'm using either function right (like I set the dx and dy to 0 for MouseClick.mi to 0, hoping that the current position of the mouse will be used as long as I don't specify a MOUSEEVENTF_MOVE event... and I don't even know if AnimateWindow will immediately hide or show the window or if it just sets the animations to be used the next time the user shows or hides a window or whatever) but it would be alot easier to find that out and fix if I could actually get the program compiled...[Edited by - K A Z E on December 15, 2005 4:09:39 PM]