0028316: Coding Rules - Elimilate confusing aliases of Standard_Real type in V3d_View
[occt.git] / samples / mfc / standard / Common / OCC_BaseChildFrame.cpp
CommitLineData
7fd59977 1// OCC_BaseChildFrame.cpp: implementation of the OCC_BaseChildFrame class.
2//
3//////////////////////////////////////////////////////////////////////
4
5#include "stdafx.h"
6
7#include "OCC_BaseChildFrame.h"
8
9#include <res\OCC_Resource.h>
10
11/////////////////////////////////////////////////////////////////////////////
12// OCC_BaseChildFrame
13
14IMPLEMENT_DYNCREATE (OCC_BaseChildFrame, CMDIChildWnd)
15
16BEGIN_MESSAGE_MAP(OCC_BaseChildFrame, CMDIChildWnd)
17 //{{AFX_MSG_MAP(OCC_BaseChildFrame)
18 //}}AFX_MSG_MAP
19END_MESSAGE_MAP()
20
21/////////////////////////////////////////////////////////////////////////////
22// OCC_BaseChildFrame construction/destruction
23
24OCC_BaseChildFrame::OCC_BaseChildFrame()
25{
26}
27
28OCC_BaseChildFrame::~OCC_BaseChildFrame()
29{
30}
31
32/////////////////////////////////////////////////////////////////////////////
33// OCC_BaseChildFrame diagnostics
34
35#ifdef _DEBUG
36void OCC_BaseChildFrame::AssertValid() const
37{
5c1f974e 38 CMDIChildWnd::AssertValid();
7fd59977 39}
40
41void OCC_BaseChildFrame::Dump(CDumpContext& dc) const
42{
5c1f974e 43 CMDIChildWnd::Dump(dc);
7fd59977 44}
45
46#endif //_DEBUG
47
48/////////////////////////////////////////////////////////////////////////////
49// OCC_BaseChildFrame message handlers
50
51void OCC_BaseChildFrame::ActivateFrame(int nCmdShow)
52{
5c1f974e 53 POSITION pos=AfxGetApp()->GetFirstDocTemplatePosition();
54 CDocTemplate* DocT=AfxGetApp()->GetNextDocTemplate(pos);
55
56 POSITION FirstDocPosition =DocT->GetFirstDocPosition();
57 POSITION p = FirstDocPosition;
58
59 CDocument* doc;
60 doc = NULL;
61
62 if(FirstDocPosition!=NULL)
63 {
64 doc = DocT->GetNextDoc(p);
65 if(AfxIsValidAddress(doc, sizeof(CDocument)) && p == NULL)
66 {
67 ASSERT_VALID(doc);
68 POSITION position = doc->GetFirstViewPosition();
69 if(position != NULL)
70 doc ->GetNextView(position);
71 if (position == NULL)
72 nCmdShow = SW_SHOWMAXIMIZED;
73 }
74 }
75
76 CMDIChildWnd::ActivateFrame(nCmdShow);
7fd59977 77}
78