I derived a CDocManager class named CMyDocManager. and I derived a CWinApp class named CMyWinApp. And I declared a member var in CMyWinApp as CMyDocManager m_pDocManager. But in my overloading virtual function OpenDocumentFile(), the m_pDocManager doesn't work properly. Here's the problem:
m_pDocManager is CMyDocManager var. I haven't initialize it. But the CWinApp::m_pDocManager is initialied. How can I initialize my own m_pDocManager? Or how can I change the functions of CDocManager m_pDocManager?
class CMyWinApp:public CWinApp
virtual void function();//overloaded
class CMyDocManager :public CDocManager
virtual void func(); //overloaded
// a error occurs here( m_pDocManager == NULL)
Thanks in advanced.