Odd VC++ "undeclared identifier"

Started by
2 comments, last by wease 18 years, 9 months ago
I have a dialog that has a class associated with it ("MyDialog.h"). If I include this file in a class that I have made myself ("MyClass.h"), I get an undeclared identifier error which shows up at the // Dialog Data enum { IDD = IDD_MYDIALOG }; part of the MyDialog.h file. However, if I include MyDialog.h in another file generated by VC++ and uninclude it from MyClass.h , I get no error and everything compilies fine. I cannot figure out why there is a problem with the ID. It is declared on the dialog as IDD_MYDIALOG. Thanks for any help any one can provide.
Advertisement
Add:

#include "resource.h"
Brianmiserere nostri Domine miserere nostri
Quote:Original post by wease

// Dialog Data
enum { IDD = IDD_MYDIALOG };

Thanks for any help any one can provide.



Given the construct I assume you're using MFC. Every once in a while this happens when the header and cpp files are generated without including the resource.h header (where IDD_MYDIALOG is typically defined)
thanks so much for your help. You guys where right. Funny about that resource.h file. I don't see it included in any of my other classes and none of them have problems with IDD being an undeclared udentifier.

This topic is closed to new replies.

Advertisement