MCPcopy Create free account
hub / github.com/Kitware/CMake / OnCreate

Method OnCreate

Tests/MFC/mfc1/MainFrm.cpp:42–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
43{
44 if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
45 return -1;
46
47 if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT,
48 WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER |
49 CBRS_TOOLTIPS | CBRS_FLYBY |
50 CBRS_SIZE_DYNAMIC) ||
51 !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) {
52 TRACE0("Failed to create toolbar\n");
53 return -1; // fail to create
54 }
55
56 if (!m_wndStatusBar.Create(this) ||
57 !m_wndStatusBar.SetIndicators(indicators,
58 sizeof(indicators) / sizeof(UINT))) {
59 TRACE0("Failed to create status bar\n");
60 return -1; // fail to create
61 }
62 // TODO: Delete these three lines if you don't want the toolbar to be
63 // dockable
64 m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
65 EnableDocking(CBRS_ALIGN_ANY);
66 DockControlBar(&m_wndToolBar);
67
68 return 0;
69}
70
71BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
72{

Callers

nothing calls this directly

Calls 1

CreateMethod · 0.45

Tested by

no test coverage detected