Re: CDialog
If I were you I would assign an ID and just replace it in your derived
classes so long as you don't intend to ever open a CBaseDlg. I'm not sure
what you buy from doing this sort of thing. Unless your dialog template is
nearly the same for each of the derived object dialogs you will end up have
different code for each anyway. If it were me I'd just make a separate
dialog .h and .cpp file for each dialog I needed and let the wizards help me
do the work.
Tom
"ou" <ou07@ab.auone-net.jp> wrote in message
news:uojgUhkYIHA.4448@TK2MSFTNGP03.phx.gbl...
With the following change, now I can pass the building.
CChildDlg::CChildDlg(CWnd* pParent /*=NULL*/)
// : CBaseDlg (CChildDlg::IDD, pParent) //cancel this line
{
//{{AFX_DATA_INIT(CChildDlg)
//}}AFX_DATA_INIT
}
But because IDD = IDD_DIALOG1 is defined in CBaseDlg, I only open
CChildDlg1(IDD_DIALOG1) . That is to say, if I create another
CChildDlg2(IDD_DIALOG2) based on CBaseDlg , it can not be
opened(IDD_DIALOG1 is opened).
So, is it possible to make my CBaseDlg without defining a IDD?
ou
I think part of your problem is that you have CDialog in the constructor
for
CChildDlg when it's really based on CBaseDlg. Error 2614 is indicating
that
you are trying to initialize a variable or object that is not part of the
class.