-
Errors in winuser.h
I have included winuser.h in my application to support the MessageBox function.
When I compile my application, I get the following 2 errors:
winuser.h(39) : error C2146: syntax error : missing ';' before identifier 'HDWP'
and
winuser.h(39) : fatal error C1004: unexpected end of file found
When I looked at the file in the editor and double clicked on the first error in the debug window, it brought me to this line (39):
typedef HANDLE HDWP;
which doesn't look any different than the other typedefs.
Now, this file was installed when I installed Visual C++ 6.0 ~ so I don't understand why it has errors... what can I do?
By the way, I am using Microsoft Visual Studio 6.0 - and I am relatively new to C++
-
did you include windows.h first?
-
winuser.h is included in windows.h.
Just include the windows header, it will work.
-
Thank you both... I actually had both included in my program so it was most likely causing confusion with the compiler.
I removed winuser.h and all seems to be well.