0028316: Coding Rules - Elimilate confusing aliases of Standard_Real type in V3d_View
[occt.git] / samples / mfc / standard / Common / OCC_2dChildFrame.cpp
1 // OCC_2dChildFrame.cpp: implementation of the OCC_2dChildFrame class.
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #include "stdafx.h"
6
7 #include "OCC_2dChildFrame.h"
8
9 #include "res\OCC_Resource.h"
10
11 //////////////////////////////////////////////////////////////////////
12 // Construction/Destruction
13 //////////////////////////////////////////////////////////////////////
14
15 IMPLEMENT_DYNCREATE (OCC_2dChildFrame, CMDIChildWnd)
16
17 BEGIN_MESSAGE_MAP(OCC_2dChildFrame, CMDIChildWnd)
18         //{{AFX_MSG_MAP(OCC_2dChildFrame)
19         ON_WM_CREATE()
20         //}}AFX_MSG_MAP
21 END_MESSAGE_MAP()
22
23
24 OCC_2dChildFrame::OCC_2dChildFrame()
25 {
26
27 }
28
29 OCC_2dChildFrame::~OCC_2dChildFrame()
30 {
31
32 }
33
34 int OCC_2dChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) 
35 {
36   if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
37     return -1;
38
39   if (!m_wndToolBar.Create(this) || !m_wndToolBar.LoadToolBar(IDR_2dCHILDFRAME))
40   {
41     TRACE0("Failed to create toolbar\n");
42     return -1; // fail to create
43   }
44
45   m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
46   m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
47   EnableDocking(CBRS_ALIGN_ANY);
48   DockControlBar(&m_wndToolBar);
49
50   return 0;
51 }
52
53 BOOL OCC_2dChildFrame::PreCreateWindow(CREATESTRUCT& cs) 
54 {
55   // TODO: Add your specialized code here and/or call the base class
56
57   return CMDIChildWnd::PreCreateWindow(cs);
58 }