Thread: Errors in winuser.h

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    31

    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++
    Welcome to the funhouse, where strange mirrors reflect the faces of insanity.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    did you include windows.h first?

  3. #3
    Unregistered
    Guest
    winuser.h is included in windows.h.
    Just include the windows header, it will work.

  4. #4
    Registered User
    Join Date
    Jun 2002
    Posts
    31
    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.
    Welcome to the funhouse, where strange mirrors reflect the faces of insanity.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. global namespace errors
    By stubaan in forum C++ Programming
    Replies: 9
    Last Post: 04-02-2008, 03:11 PM
  2. Ten Errors
    By AverageSoftware in forum Contests Board
    Replies: 0
    Last Post: 07-20-2007, 10:50 AM
  3. Unknown Errors in simple program
    By neandrake in forum C++ Programming
    Replies: 16
    Last Post: 04-06-2004, 02:57 PM
  4. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 05:44 PM
  5. Help me with these errors... :-(
    By major_small in forum C++ Programming
    Replies: 6
    Last Post: 09-07-2003, 08:18 PM