LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { CreateSimpleToolBar(); CreateSimpleStatusBar(); m_hWndClient = m_view.Create(m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, WS_EX_CLIENTEDGE); UIAddToolBar(m_hWndToolBar); UISetCheck(ID_VIEW_TOOLBAR, 1); UISetCheck(ID_VIEW_STATUS_BAR, 1); // register object for message filtering and idle updates CMessageLoop* pLoop = _Module.GetMessageLoop(); ATLASSERT(pLoop != NULL); pLoop->AddMessageFilter(this); pLoop->AddIdleHandler(this); return 0; }
LRESULT onCreate(UINT, WPARAM, LPARAM, BOOL&) { CreateSimpleToolBar(); //CreateSimpleStatusBar(IDR_MAINFRAME); m_hWndStatusBar = m_wndStatusBar.Create ( *this ); // Create the status bar panes. int anPanes[] = { ID_DEFAULT_PANE, IDS_NAME, IDS_RELIGION }; m_wndStatusBar.SetPanes ( anPanes, 3, false ); // Set the initial text for the clock status pane. m_wndStatusBar.SetPaneText(ID_DEFAULT_PANE, TEXT("Zen0")); m_wndStatusBar.SetPaneText(IDS_NAME, TEXT("Zen1")); m_wndStatusBar.SetPaneText(IDS_RELIGION, TEXT("Zen2")); // // Set the initial state of the Clock menu items: UIEnable( ID_FILE_NEW, false ); UIEnable( ID_FILE_OPEN, true ); UISetCheck(ID_VIEW_TOOLBAR, true); return 0; }
LRESULT MainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { EnteredNewSystem(); #ifdef UNDER_CE CreateSimpleCEMenuBar(IDR_MAINFRAME, SHCMBF_HMENU); // create tab view m_hWndClient = m_tabView.Create(m_hWnd, rcDefault); #else CreateSimpleToolBar(); CreateSimpleStatusBar(); CRect rcWindow = rcDefault; // TODO m_hWndClient = m_tabView.Create(m_hWnd, rcWindow, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, WS_EX_CLIENTEDGE); // CMenuHandle menuMain = GetMenu(); // m_tabView.SetWindowMenu(menuMain.GetSubMenu(WINDOW_MENU_POSITION)); #endif // create tab windows m_marketView.Create(m_tabView); m_planetInfoView.Create(m_tabView); m_shortRangeMapView.Create(m_tabView); m_tabView.AddPage(m_shortRangeMapView, _T("Local Map")); m_tabView.AddPage(m_marketView, _T("Market")); m_tabView.AddPage(m_planetInfoView, _T("Planet Info")); m_tabView.SetActivePage(0); // register object for message filtering and idle updates CMessageLoop* pLoop = _Module.GetMessageLoop(); ATLASSERT(pLoop != NULL); pLoop->AddMessageFilter(this); pLoop->AddIdleHandler(this); return 0; }
LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { CreateSimpleToolBar(); CreateSimpleStatusBar(); m_hWndClient = m_view.Create(m_hWnd); UIAddToolBar(m_hWndToolBar); UISetCheck(ID_VIEW_TOOLBAR, 1); UISetCheck(ID_VIEW_STATUS_BAR, 1); UISetCheck(ID_TOOLS_REPEAT, 1); UISetCheck(ID_SPEED_100, 1); lastSpeedId=ID_SPEED_100; // register object for message filtering and idle updates CMessageLoop* pLoop = _Module.GetMessageLoop(); ATLASSERT(pLoop != NULL); pLoop->AddMessageFilter(this); pLoop->AddIdleHandler(this); // Init MRU list CMenuHandle mainMenu = GetMenu(); CMenuHandle fileMenu = mainMenu.GetSubMenu(0); CMenuHandle mruMenu = fileMenu.GetSubMenu(9); m_mru.SetMenuHandle ( mruMenu ); m_mru.UpdateMenu(); m_mru.ReadFromRegistry(APP_SETTINGS_KEY); m_mru.SetMaxEntries(4); UIEnable ( ID_TOOLS_START, true ); UIEnable ( ID_TOOLS_STOP, false ); return 0; }
LRESULT CMainWindow::onCreate(UINT, WPARAM, LPARAM, BOOL&) { // new EventManager(); // CreateSimpleToolBar(); // //CreateSimpleStatusBar(TEXT("Ready")); m_hWndStatusBar = m_wndStatusBar.Create ( *this ); // Create the status bar panes. int anPanes[] = { ID_DEFAULT_PANE, ID_DEFAULT_PANE_1, ID_DEFAULT_PANE_2 }; m_wndStatusBar.SetPanes ( anPanes, 3, true ); // m_wndSplitVertical.Create ( *this, rcDefault ); // if (1) { mPropertyDlg.Create(m_wndSplitVertical, rcDefault); m_wndSplitVertical.SetSplitterPane(SPLIT_PANE_LEFT, mPropertyDlg); } else { mTreeDlg.Create(m_wndSplitVertical, rcDefault); m_wndSplitVertical.SetSplitterPane(SPLIT_PANE_LEFT, mTreeDlg); } // m_wndSplitVerticalProperty.Create(m_wndSplitVertical, rcDefault); m_wndSplitVertical.SetSplitterPane(SPLIT_PANE_RIGHT, m_wndSplitVerticalProperty); // mViewWindow.Create(m_wndSplitVerticalProperty, rcDefault); m_wndSplitVerticalProperty.SetSplitterPane(SPLIT_PANE_LEFT, mViewWindow); // if (1) { mTreeDlg.Create(m_wndSplitVerticalProperty, rcDefault); m_wndSplitVerticalProperty.SetSplitterPane(SPLIT_PANE_RIGHT, mTreeDlg); } else { mPropertyDlg.Create(m_wndSplitVerticalProperty, rcDefault); m_wndSplitVerticalProperty.SetSplitterPane(SPLIT_PANE_RIGHT, mPropertyDlg); } // m_hWndClient = m_wndSplitVertical; UpdateLayout(); /* Note that you need to set m_hWndClient and call CFrameWindowImpl::UpdateLayout() before setting the splitter position. UpdateLayout() resizes the splitter window to its initial size. If you skip that step, the splitter's size isn't under your control and it might be smaller than 200 pixels wide. The end result would be that SetSplitterPos() wouldn't have the effect you wanted. */ m_wndSplitVertical.SetSplitterPos(200); m_wndSplitVerticalProperty.SetSplitterPos(700); // return 1; }