Integration of OCCT 6.5.0 from SVN
[occt.git] / samples / mfc / standard / 01_Geometry / src / ChildFrm2d.cpp
1 // ChildFrm2D.cpp : implementation of the CChildFrame2D class/
2
3 #include "stdafx.h"
4
5 #include "ChildFrm2d.h"
6
7 #include "GeometryApp.h"
8
9 IMPLEMENT_DYNCREATE(CChildFrame2D, CMDIChildWnd)
10
11 BEGIN_MESSAGE_MAP(CChildFrame2D, CMDIChildWnd)
12         //{{AFX_MSG_MAP(CChildFrame2D)
13         ON_WM_CREATE()
14         //}}AFX_MSG_MAP
15 END_MESSAGE_MAP()
16
17 static UINT indicators[] =
18 {
19         ID_SEPARATOR,           // status line indicator
20         ID_INDICATOR_CAPS,
21         ID_INDICATOR_NUM,
22         ID_INDICATOR_SCRL,
23 };
24
25
26 /////////////////////////////////////////////////////////////////////////////
27 // CChildFrame2D construction/destruction
28
29 CChildFrame2D::CChildFrame2D()
30 {
31         // TODO: add member initialization code here
32         
33 }
34
35 CChildFrame2D::~CChildFrame2D()
36 {
37 }
38
39 /////////////////////////////////////////////////////////////////////////////
40 // CChildFrame2D diagnostics
41
42 #ifdef _DEBUG
43 void CChildFrame2D::AssertValid() const
44 {
45         CMDIChildWnd::AssertValid();
46 }
47
48 void CChildFrame2D::Dump(CDumpContext& dc) const
49 {
50         CMDIChildWnd::Dump(dc);
51 }
52
53 #endif //_DEBUG
54
55 /////////////////////////////////////////////////////////////////////////////
56 // CChildFrame2D message handlers
57
58 int CChildFrame2D::OnCreate(LPCREATESTRUCT lpCreateStruct) 
59 {
60         
61         if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
62                 return -1;
63         
64         if (!m_wndToolBar.Create(this) ||
65                 !m_wndToolBar.LoadToolBar(IDR_2dCHILDFRAME))
66         {
67                 TRACE0("Failed to create toolbar\n");
68                 return -1;      // fail to create
69         }
70
71         // TODO: Remove this if you don't want tool tips or a resizeable toolbar
72         m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
73                 CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
74
75         // TODO: Delete these three lines if you don't want the toolbar to
76         //  be dockable
77         m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
78         EnableDocking(CBRS_ALIGN_ANY);
79         DockControlBar(&m_wndToolBar);
80         
81         return 0;
82
83 }
84
85
86 void CChildFrame2D::ActivateFrame(int nCmdShow) 
87 {
88         // TODO: Add your specialized code here and/or call the base class
89         
90         CMDIChildWnd::ActivateFrame(nCmdShow);
91 }