1 // OCC_2dChildFrame.cpp: implementation of the OCC_2dChildFrame class.
3 //////////////////////////////////////////////////////////////////////
7 #include "OCC_2dChildFrame.h"
9 #include "res\OCC_Resource.h"
11 //////////////////////////////////////////////////////////////////////
12 // Construction/Destruction
13 //////////////////////////////////////////////////////////////////////
15 IMPLEMENT_DYNCREATE (OCC_2dChildFrame, CMDIChildWnd)
17 BEGIN_MESSAGE_MAP(OCC_2dChildFrame, CMDIChildWnd)
18 //{{AFX_MSG_MAP(OCC_2dChildFrame)
24 OCC_2dChildFrame::OCC_2dChildFrame()
29 OCC_2dChildFrame::~OCC_2dChildFrame()
34 int OCC_2dChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
36 if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
39 if (!m_wndToolBar.Create(this) || !m_wndToolBar.LoadToolBar(IDR_2dCHILDFRAME))
41 TRACE0("Failed to create toolbar\n");
42 return -1; // fail to create
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);
53 BOOL OCC_2dChildFrame::PreCreateWindow(CREATESTRUCT& cs)
55 // TODO: Add your specialized code here and/or call the base class
57 return CMDIChildWnd::PreCreateWindow(cs);