CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    162

    Need help with some CDialog errors.

    After i made some changes to my dialog.. it show me this error with this line

    enum { IDD = IDD_CIBUTTON_DIALOG };

    error:
    error C2065: 'IDD_CIBUTTON_DIALOG' : undeclared identifier
    error C2057: expected constant expression
    I made add an onclick event to my button in the dialog and there comes the error ;( ... any idea where has gone wrong?

    Thanks.
    0 error(s), 0 warning(s)

  2. #2
    Join Date
    Sep 2001
    Location
    San Diego
    Posts
    2,147
    The IDD_CIBUTTON_DIALOG should be declared in your resource.h file and was created in the resource editor.

    Check if it still exists in the resource editor, and if so, check where you are adding the #include "resource.h" file.

    Your dialog.h file may be getting included in some cpp file that is not aware of the resource.h header.

    If this is the case, simply add #include "resource.h" above the #include "mydialog.h" in the other cpp file.

    To correctly answer your question, we need to know which file was being compiled when the error is reported. This can be seen in the lines above the error in the output window. This will probably indicate where resource.h needs to be included.

    Hope this helps,

    - Nigel

  3. #3
    Join Date
    Jul 2004
    Posts
    1

    Thank You!

    Thank you,

    I had a similar problem, thanks to NigelQ it is now fixed.

    Topman!

    kurt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured