-
August 30th, 2001, 03:29 AM
#1
SendInput() function 'INPUT' : undeclared identifier
I want to use SendInput function to simulate mouse event ..
but if i declare object of INPUT structure , compiler prompts me with the error
'INPUT' : undeclared identifier
I have also included 'WinUser.h' and 'Windows.h' i have also included User32.lib in the project settings -link tab.
I m stuck ! can some Guru help me out !
Thanks in advance ... needless to say gurus are always rated .
Abhishek Narula
(Member Technical Staff)
Syndew.Com Pvt. Ltd.
-
August 30th, 2001, 03:45 AM
#2
Re: SendInput() function 'INPUT' : undeclared identifier
put this line into stdafx.h before any includes
#define _WIN32_WINNT 0x0500
Please - rate answer if it helped you
It gives me inspiration when I see myself in the top list =)
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor@soukhov.com | ICQ:57404554 | http://soukhov.com
Member of Russian Software Developer Network http://rsdn.ru
-
August 30th, 2001, 03:51 AM
#3
Hats off to you boss
Thanks a zillion boss !
i would also appreciate if you can throw little more light on this
'#define _WIN32_WINNT 0x0500' thing. Although the thing has started moving ..but what is the reason behind that. why is this include required , how do find it out , where all do we require these kind of includes !
Thanks a lot!
Regards,
Abhishek Narula
(Member Technical Staff)
Syndew.Com Pvt. Ltd.
-
February 20th, 2002, 08:56 PM
#4
Re: SendInput() function 'INPUT' : undeclared identifier
Igor, thanks so much. I was struggling with this problem for a very long time, and had absolutely no idea what was wrong until I saw your post. Now everything compiles perfectly
Ulysses
-
September 27th, 2017, 12:59 PM
#5
Re: SendInput() function 'INPUT' : undeclared identifier
This is a non-issue with new compilers like VS2015 where SendInput() readily compiles but for VC6, the #include didn't work. I had to add the flag /D _WIN32_WINNT=0x401 to project settings at C/C++ tab > Catagory General (combo box) and down on that page to "Project Options". I added this /D _WIN32_WINNT=0x401 right after UNIICODE flag.
Note /d is just telling the compiler it is followed by the flag and _WIN32_WINNT=0x401 is the actual flag.
-
September 27th, 2017, 04:37 PM
#6
Re: SendInput() function 'INPUT' : undeclared identifier
Originally Posted by caezar
This is a non-issue with new compilers like VS2015 where SendInput() readily compiles but for VC6, the #include didn't work. I had to add the flag /D _WIN32_WINNT=0x401 to project settings at C/C++ tab > Catagory General (combo box) and down on that page to "Project Options". I added this /D _WIN32_WINNT=0x401 right after UNIICODE flag.
Note /d is just telling the compiler it is followed by the flag and _WIN32_WINNT=0x401 is the actual flag.
And what and whom did you want to explain with your post in this more than 15 years old thread?
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|