Get the CChildFrame from CDocument or CView
Posted on 2002-04-15
For example my classes are CDifarDocument/CDifarView subclass of CDocument/CView . How to get the CChildFrame from CDifarDocument or CDifarView ?
My purpose is to get the system menu of the child window to enable/disable buttons, I can get the system menu from CChildFrame, but cannot get from other objects.
From CDifarDocument I get the CDifarView, and from CDifarView get the system menu:
CMenu *pSysMenu = pView->GetSystemMenu(FALSE);
ASSERT(pSysMenu != NULL);
but it fail at the ASSERT