77f6a8ae2bd3e7a564fba8b58a54485d27943b33
[occt.git] / samples / mfc / standard / Common / OCC_3dChildFrame.cpp
1 // OCC_3dChildFrame.cpp: implementation of the OCC_3dChildFrame class.
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #include "stdafx.h"
6
7 #include "OCC_3dChildFrame.h"
8
9 #include "res\OCC_Resource.h"
10
11 //////////////////////////////////////////////////////////////////////
12 // Construction/Destruction
13 //////////////////////////////////////////////////////////////////////
14
15
16 IMPLEMENT_DYNCREATE (OCC_3dChildFrame, OCC_BaseChildFrame)
17
18 BEGIN_MESSAGE_MAP(OCC_3dChildFrame, OCC_BaseChildFrame)
19         //{{AFX_MSG_MAP(OCC_3dChildFrame)
20         ON_WM_CREATE()
21         //}}AFX_MSG_MAP
22 END_MESSAGE_MAP()
23
24 OCC_3dChildFrame::OCC_3dChildFrame()
25 {
26
27 }
28
29 OCC_3dChildFrame::~OCC_3dChildFrame()
30 {
31
32 }
33
34 int OCC_3dChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) 
35 {
36   if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
37     return -1;
38
39   if (!m_wndToolBar.Create(this) || !m_wndToolBar.LoadToolBar(IDR_3dCHILDFRAME))
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 }