Anybody has any ideas? Please write down something if you have any
suggestions!
Thanks!!!
Hu
CPropertySheet is not derived from CDialog and does not have an
OnInitDialog method. Your code to initialize the property sheet should
be put in the constructor of your CPropertySheet-derived class.
--
Scott McPhillips [VC++ MVP]
Pierre Couderc
I can't figure why the compiler is complaining -- CPropertySheet does indeed
have a public: virtual BOOL OnInitDialog() member function (in both MFC42
and MFC71). In a quick test, I get no error(s) at all deriving, overriding
and calling the base implementation using either MFC version.
--
Jeff Partch [VC++ MVP]
>>In the override method
>>OnInitDialog(), I want to call the base method
>>CPropertySheet::OnInitDialog() first.
When you over-ride OnInitDialog(), in either
the CPropertyPage or the CPropertySheet,
The Base class OnInitDialog will be automatically inserted.
BOOL CPageWav::OnInitDialog()
{
CPageX::OnInitDialog(); //My Base class. Yours would be
CPropertyPage::OnInitDialog().
...
}
BOOL CPropertySheetX::OnInitDialog()
{
BOOL bResult = CPropertySheet::OnInitDialog();
return bResult;
}
I think you have a problem, such as not inheriting from CPropertySheet,
or some other problem.
Check the following functions to make sure you are inheriting from
CPropertySheet.
class CPropertySheetX : public CPropertySheet
BEGIN_MESSAGE_MAP(CPropertySheetX, CPropertySheet)
IMPLEMENT_DYNAMIC(CPropertySheetX, CPropertySheet)
CPropertySheetX::CPropertySheetX(CWnd* pParentWnd, CDocXX *pDoc)
:CPropertySheet(AFX_IDS_APP_TITLE, pParentWnd)
Those will screw you up, if they are not correct.
Regards,
--
Christopher J. Holland [!MVP]
http://www.mvps.org/vcfaq/
http://www.codeguru.com
http://www.codeproject.com
http://www.naughter.com/
http://support.microsoft.com/default.aspx
http://msdn.microsoft.com/howto/
http://msdn.microsoft.com/library/
http://www3.pgh.net/~newcomer
"Pierre Couderc" <pie...@couderc.ccNOSPAM> wrote in message
news:cdbc2s$19q0$1...@biggoron.nerim.net...