1 // OCC_BaseChildFrame.cpp: implementation of the OCC_BaseChildFrame class.
3 //////////////////////////////////////////////////////////////////////
7 #include "OCC_BaseChildFrame.h"
9 #include <res\OCC_Resource.h>
11 /////////////////////////////////////////////////////////////////////////////
14 IMPLEMENT_DYNCREATE (OCC_BaseChildFrame, CMDIChildWnd)
16 BEGIN_MESSAGE_MAP(OCC_BaseChildFrame, CMDIChildWnd)
17 //{{AFX_MSG_MAP(OCC_BaseChildFrame)
21 /////////////////////////////////////////////////////////////////////////////
22 // OCC_BaseChildFrame construction/destruction
24 OCC_BaseChildFrame::OCC_BaseChildFrame()
28 OCC_BaseChildFrame::~OCC_BaseChildFrame()
32 /////////////////////////////////////////////////////////////////////////////
33 // OCC_BaseChildFrame diagnostics
36 void OCC_BaseChildFrame::AssertValid() const
38 CMDIChildWnd::AssertValid();
41 void OCC_BaseChildFrame::Dump(CDumpContext& dc) const
43 CMDIChildWnd::Dump(dc);
48 /////////////////////////////////////////////////////////////////////////////
49 // OCC_BaseChildFrame message handlers
51 void OCC_BaseChildFrame::ActivateFrame(int nCmdShow)
53 POSITION pos=AfxGetApp()->GetFirstDocTemplatePosition();
54 CDocTemplate* DocT=AfxGetApp()->GetNextDocTemplate(pos);
56 POSITION FirstDocPosition =DocT->GetFirstDocPosition();
57 POSITION p = FirstDocPosition;
62 if(FirstDocPosition!=NULL)
64 doc = DocT->GetNextDoc(p);
65 if(AfxIsValidAddress(doc, sizeof(CDocument)) && p == NULL)
68 POSITION position = doc->GetFirstViewPosition();
70 doc ->GetNextView(position);
72 nCmdShow = SW_SHOWMAXIMIZED;
76 CMDIChildWnd::ActivateFrame(nCmdShow);