question about dialog
-
i derived a dialog class named "CDlgBase" from CDialog,and then derived a dialog class named "CDlgLogon" from "CDlgBase". When i use the following to show CDlgLogon,the dialog showed on the screen is CDlgBase instead of CDlgLogon. What' wrong with the code? ..... CDlgLogon dlg; dlg.DoModal(); ..... gucy
-
i derived a dialog class named "CDlgBase" from CDialog,and then derived a dialog class named "CDlgLogon" from "CDlgBase". When i use the following to show CDlgLogon,the dialog showed on the screen is CDlgBase instead of CDlgLogon. What' wrong with the code? ..... CDlgLogon dlg; dlg.DoModal(); ..... gucy
in the CDlgLogon class constructor, are you passing the dialog template ID to the CDlgBase class constructor so that it can pass it on to CDialog? I think not!
CDlgBase::CDlgBase (UINT IDD, CWnd* pParent)
: CDialog (IDD, pParent)
{
...
}
CDlgLogon::CDlgLogon(CWnd* pParent)
: CDlgBase(CDlgLogon::IDD, pParent)
{
...
}
[
](http://www.canucks.com)Sonork 100.11743 Chicken Little "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 Within you lies the power for good - Use it!
-
in the CDlgLogon class constructor, are you passing the dialog template ID to the CDlgBase class constructor so that it can pass it on to CDialog? I think not!
CDlgBase::CDlgBase (UINT IDD, CWnd* pParent)
: CDialog (IDD, pParent)
{
...
}
CDlgLogon::CDlgLogon(CWnd* pParent)
: CDlgBase(CDlgLogon::IDD, pParent)
{
...
}
[
](http://www.canucks.com)Sonork 100.11743 Chicken Little "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 Within you lies the power for good - Use it!
-
in the CDlgLogon class constructor, are you passing the dialog template ID to the CDlgBase class constructor so that it can pass it on to CDialog? I think not!
CDlgBase::CDlgBase (UINT IDD, CWnd* pParent)
: CDialog (IDD, pParent)
{
...
}
CDlgLogon::CDlgLogon(CWnd* pParent)
: CDlgBase(CDlgLogon::IDD, pParent)
{
...
}
[
](http://www.canucks.com)Sonork 100.11743 Chicken Little "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 Within you lies the power for good - Use it!