Question : base class undefined?

Hi,

 This is a test project for a big project:

 I inserted a dialog box and its class, CmyDlg, to a MFC project. I also added a .cpp and a .h file into the project. I wrote the following line in the .cpp file:
 #include "myDlg.h"

That is all, nothing more. However, it gave me many error messages:
                                        'CDialog' : base class undefined
                                        unexpected 'class CmyDlg ('
                                        ......
I have checked the class info and that holdes a line:
Base class : CDialog

So, what is missing?????????????

Answer : base class undefined?

hi markdot,

Whatever u have pasted here that does not show any #include

If it is giving error for CDialog class then sure u havent added any MFC header file and for CDialog it is afxwin.h

If ur application is generated by appwizard (means ur project is of type MFC Appwizard(exe)) then just check stdafx file and be sure that afxwin.h is there
Or if ur project is of different type(Win32 Application or so) then just add in ur mydlg.h
#include

hope this will help
Random Solutions  
 
programming4us programming4us