CDialog
Env: WindowsXP, VC++6.00
I am trying to make a CBaseDlg based on CDialog and some child
dialogs(CChildDlg1) based on CBaseDlg.
CBaseDlg is created by ClassWizard. ClassWizard asks a ID for CBaseDlg, but
CBaseDlg doesn't correspond to any dialog.
So, how should I fix the following sources in order to pass building?
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//BaseDlg.h
class CBaseDlg : public CDialog
{
public:
CBaseDlg (CWnd* pParent = NULL);
//{{AFX_DATA(CBaseDlg )
enum { IDD = _UNKNOWN_RESOURCE_ID_ };
//}}AFX_DATA
//{{AFX_VIRTUAL(CBaseDlg )
protected:
virtual void DoDataExchange(CDataExchange* pDX);
//}}AFX_VIRTUAL
protected:
//{{AFX_MSG(CBaseDlg )
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//BaseDlg.cpp
CBaseDlg ::CBaseDlg (CWnd* pParent /*=NULL*/)
: CDialog(CBaseDlg ::IDD, pParent)
{
//{{AFX_DATA_INIT(CBaseDlg )
//}}AFX_DATA_INIT
}
void CBaseDlg ::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CBaseDlg )
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CBaseDlg , CDialog)
//{{AFX_MSG_MAP(CBaseDlg )
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//ChildDlg.h
class CChildDlg : public CBaseDlg
{
public:
CChildDlg(CWnd* pParent = NULL);
//{{AFX_DATA(CChildDlg)
enum { IDD = IDD_DIALOG1 };
//}}AFX_DATA
//{{AFX_VIRTUAL(CChildDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX);
//}}AFX_VIRTUAL
protected:
//{{AFX_MSG(CChildDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//ChildDlg.cpp
CChildDlg::CChildDlg(CWnd* pParent /*=NULL*/)
: CDialog(CChildDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CChildDlg)
//}}AFX_DATA_INIT
}
void CChildDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CChildDlg)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CChildDlg, CBaseDlg)
//{{AFX_MSG_MAP(CChildDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
TIA
ou