Problem when including Dialog Class File in more then one file in MFC

This is a discussion on Problem when including Dialog Class File in more then one file in MFC within the C++ Programming forums, part of the General Programming Boards category; Whenever I include mydialog.h in more then one file I get: C2057: expected constant expression C2065: 'IDD_CLOUDS_DIALOG' : undeclared identifier ...

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    5

    Problem when including Dialog Class File in more then one file in MFC

    Whenever I include mydialog.h in more then one file I get:

    C2057: expected constant expression
    C2065: 'IDD_CLOUDS_DIALOG' : undeclared identifier

    How can I fix this?

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    34
    some code

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    28

    Re: Problem when including Dialog Class File in more then one file in MFC

    Originally posted by WiKiDJeFF
    Whenever I include mydialog.h in more then one file I get:

    C2057: expected constant expression
    C2065: 'IDD_CLOUDS_DIALOG' : undeclared identifier

    How can I fix this?
    You may need to #include your resource file before you #include your mydialog.h file, because thats probably where IDD_CLOUDS_DIALOG is defined.
    -Grunt (Malek)

  4. #4
    Registered User
    Join Date
    Apr 2003
    Posts
    5
    ye that was the problem Malek, thx.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 05:27 PM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 01:13 AM
  3. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 09:39 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 10:54 AM
  5. Document Class and Dialog Windows :: MFC
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 12-01-2002, 12:27 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21