void CMainFrame::OnCustomize() { // get a pointer to the command bars object. CXTPCommandBars* pCommandBars = GetCommandBars(); if (pCommandBars == NULL) return; // instanciate the customize dialog CXTPCustomizeSheet dlg(pCommandBars); // add the options page to the customize dialog. CXTPCustomizeOptionsPage pageOptions(&dlg); dlg.AddPage(&pageOptions); // add the commands page to the customize dialog. CXTPCustomizeCommandsPage* pPageCommands = dlg.GetCommandsPage(); pPageCommands->AddCategories(IDR_MAINFRAME); // initialize the commands page page. pPageCommands->InsertAllCommandsCategory(); pPageCommands->InsertBuiltInMenus(IDR_MAINFRAME); pPageCommands->InsertNewMenuCategory(); // display the customize dialog. dlg.DoModal(); }
void CMainFrame::OnCustomize() { // Get a pointer to the command bars object. CXTPCommandBars* pCommandBars = GetCommandBars(); if(pCommandBars != NULL) { // Instanciate the customize dialog object. CXTPCustomizeSheet dlg(pCommandBars); // Add the keyboard page to the customize dialog. CXTPCustomizeKeyboardPage pageKeyboard(&dlg); dlg.AddPage(&pageKeyboard); pageKeyboard.AddCategories(IDR_MAINFRAME); // Add the options page to the customize dialog. CXTPCustomizeOptionsPage pageOptions(&dlg); dlg.AddPage(&pageOptions); // Add the commands page to the customize dialog. CXTPCustomizeCommandsPage* pCommands = dlg.GetCommandsPage(); pCommands->AddCategories(IDR_MAINFRAME); // Use the command bar manager to initialize the // customize dialog. pCommands->InsertAllCommandsCategory(); pCommands->InsertBuiltInMenus(IDR_MAINFRAME); pCommands->InsertNewMenuCategory(); // Dispaly the dialog. dlg.DoModal(); } }
void CMainFrame::OnCustomize() { CXTPCustomizeSheet cs(GetCommandBars()); CXTPCustomizeOptionsPage pageOptions(&cs); cs.AddPage(&pageOptions); CXTPCustomizeCommandsPage* pCommands = cs.GetCommandsPage(); pCommands->AddCategories(IDR_MAINFRAME); pCommands->InsertAllCommandsCategory(); pCommands->InsertBuiltInMenus(IDR_MAINFRAME); pCommands->InsertNewMenuCategory(); cs.DoModal(); }
void CMainFrame::OnCustomize(void) { CXTPCommandBars* pCommandBars = GetCommandBars(); if(pCommandBars != NULL) { CXTPCustomizeSheet dlg(pCommandBars); CXTPCustomizeKeyboardPage pageKeyboard(&dlg); dlg.AddPage(&pageKeyboard); pageKeyboard.AddCategories(IDR_MAINFRAME); CXTPCustomizeOptionsPage pageOptions(&dlg); dlg.AddPage(&pageOptions); CXTPCustomizeCommandsPage* pCommands = dlg.GetCommandsPage(); pCommands->AddCategories(IDR_MAINFRAME); pCommands->InsertAllCommandsCategory(); pCommands->InsertBuiltInMenus(IDR_MAINFRAME); pCommands->InsertNewMenuCategory(); dlg.DoModal(); } }