AVee
2007-06-20 21:54:31 UTC
How does the CFrameWnd->m_pActiveView member function get attached? I am
creating a CFrameWnd object with CRuntimeClass->CreateObject(), and passing
it a my RUNTIME_CLASS( myViewClass) View class in the
CCreateContext->m_pNewViewClass member when I pass the CreateContext argument
to LoadFrame(). Everything works fine when run ActivateFrame(), View and
Frame functioning normally. However, when I call CFrameWnd->GetActiveView(),
which only returns its member m_pActiveView, it returns NULL. Tracing
through MFC source, I noticed that when the View object is created, it
doesn't get saved to CFrameWnd->m_pActiveView. So, my question - How might I
attach the View to the Frame?
creating a CFrameWnd object with CRuntimeClass->CreateObject(), and passing
it a my RUNTIME_CLASS( myViewClass) View class in the
CCreateContext->m_pNewViewClass member when I pass the CreateContext argument
to LoadFrame(). Everything works fine when run ActivateFrame(), View and
Frame functioning normally. However, when I call CFrameWnd->GetActiveView(),
which only returns its member m_pActiveView, it returns NULL. Tracing
through MFC source, I noticed that when the View object is created, it
doesn't get saved to CFrameWnd->m_pActiveView. So, my question - How might I
attach the View to the Frame?