A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
And if you want to call OnOpenDocumentFile from AView, you must save the CMultiDocTemplate pointer to a member of your CWinApp class.
Like this:
- class CMyApp : public CWinAppEx
{
public:
CMultiDocTemplate* m_pDocTemplateB;
}
- in InitInstance save the pointer:
m_pDocTemplateB = new CMultiDocTemplate(IDR_xxxTYPE,
RUNTIME_CLASS(BDoc),
RUNTIME_CLASS(CFrame),
RUNTIME_CLASS(BView));
if (!m_pDocTemplateB) return FALSE;
AddDocTemplate(m_pDocTemplateB); - Whereever you want to create a new BView client window:
((CMyApp*)::AfxGetApp())->m_pDocTemplateB->OpenDocumentFile(NULL);
Regards, Guido