LRESULT gkToolBarPaneBase::OnKickIdle(WPARAM, LPARAM) { m_paneManager.UpdatePanes(); if (GetCommandBars()) GetCommandBars()->UpdateCommandBars(); return 0; }
void CMainFrame::SetOfficeTheme(int nCalendarTheme) { // xtpThemeOffice2000, // Office 2000 theme. // xtpThemeOfficeXP, // Office XP theme. // xtpThemeOffice2003, // Office 2003 theme. // xtpThemeNativeWinXP, // Windows XP themes support. // xtpThemeWhidbey, // Visual Studio 2005 theme. // xtpThemeOffice2007, // Office 2007 theme. // xtpThemeRibbon, // Office 2007 style ribbon theme // xtpThemeVisualStudio2008, // Visual Studio 2008 theme // xtpThemeCustom // Custom theme. static int sarThemesMap[xtpCalendarThemeOffice2007+1] = {0}; if (sarThemesMap[xtpCalendarThemeOffice2000] == 0) { sarThemesMap[xtpCalendarThemeOffice2000] = xtpThemeOffice2000; sarThemesMap[xtpCalendarThemeOfficeXP] = xtpThemeOfficeXP; sarThemesMap[xtpCalendarThemeOffice2003] = xtpThemeOffice2003; sarThemesMap[xtpCalendarThemeOffice2007] = xtpThemeRibbon; } // 0 - Blue, 1 - Silver, 2 - Black int nTheme2007Style = 0; if (nCalendarTheme > xtpCalendarThemeOffice2007) { nTheme2007Style = nCalendarTheme - xtpCalendarThemeOffice2007 - 100; nCalendarTheme = xtpCalendarThemeOffice2007; } XTPPaintTheme nTheme2 = (XTPPaintTheme)sarThemesMap[nCalendarTheme]; //------------------------------------ CString strFilePath = _GetTheme2007Style_file(nTheme2007Style); XTPOffice2007Images()->SetHandle(strFilePath); //=============================================================== #ifdef _XTP_INCLUDE_RIBBON CXTPPaintManager::SetTheme(nTheme2); if (nTheme2 == xtpThemeRibbon) EnableOffice2007Frame(GetCommandBars()); else EnableOffice2007Frame(0); #else CXTPPaintManager::SetTheme((XTPPaintTheme)min(nTheme2, xtpThemeOffice2003)); #endif // _XTP_INCLUDE_RIBBON XTPColorManager()->SetLunaTheme((nTheme2 == xtpThemeOffice2000) ? xtpSystemThemeUnknown : xtpSystemThemeAuto); RecalcLayout(FALSE); GetCommandBars()->RedrawCommandBars(); RedrawWindow(); m_nOfficeTheme = nCalendarTheme; CCalendarDemoView *pView = DYNAMIC_DOWNCAST(CCalendarDemoView, GetActiveView()); if (pView) pView->OnOfficeThemeChanged(nCalendarTheme); }
void CMainFrame::_LoadIcon() { CXTPImageManager* pImageMgr = GetCommandBars()->GetImageManager(); UINT uiSystemMenu[] = { ID_FILE_NEW, ID_FILE_OPEN, ID_FILE_SAVE }; pImageMgr->SetIcons(IDB_SYSTEMMENULARGE, uiSystemMenu, _countof(uiSystemMenu), CSize(32, 32)); UINT uCommand = {IDB_GEAR}; pImageMgr->SetIcons(IDB_GEAR, &uCommand, 1, CSize(0, 0), xtpImageNormal); UINT icon[1] = { IDC_Terrain_Deform }; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Terrain_Splat; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_NavMesh_Generate; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_NavMesh_Show; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_NavMesh_SaveObj; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_NavMesh_SaveNavMesh; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Object_Move; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Object_Rotate; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Object_Scale; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Object_Select; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Object_Remove; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_GameData_Building; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Effect_Shadow; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Effect_SSAO; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Effect_Sharpen; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Effect_FXAA; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Animation_Play; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Animation_Stop; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_GameData_BehaviorTreeEditor; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); }
void gkToolBarPaneBase::InitToolBar( const TCHAR* toolbarname, DWORD nId ) { ////////////////////////////////////////////////////////////////////////// // ToolBar Initilizing VERIFY(InitCommandBars()); CXTPCommandBars* pCommandBars = GetCommandBars(); pCommandBars->GetImageManager()->SetIcons(nId); pCommandBars->SetTheme(xtpThemeWhidbey); //pCommandBars->SetQuickCustomizeMode(FALSE); //TCHAR toolbarname = CXTPToolBar* pToolBar = pCommandBars->Add(toolbarname, xtpBarTop); pToolBar->SetDefaultButtonStyle(xtpButtonIcon); pToolBar->LoadToolBar(nId); pToolBar->SetCloseable(FALSE); pToolBar->EnableCustomization(); pToolBar->GetControls()->CreateOriginalControls(); pCommandBars->GetCommandBarsOptions()->ShowKeyboardCues(xtpKeyboardCuesShowWindowsDefault); pCommandBars->GetToolTipContext()->SetStyle(xtpToolTipOffice2007); RecalcLayout(); ////////////////////////////////////////////////////////////////////////// }
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::OnFrameTheme() { ShowWindow(SW_NORMAL); CXTPRibbonBar* pRibbonBar = (CXTPRibbonBar*)GetCommandBars()->GetAt(0); CXTPWindowRect rc(this); rc.top += (pRibbonBar->IsFrameThemeEnabled() ? -1 : +1) * GetSystemMetrics(SM_CYCAPTION); MoveWindow(rc); pRibbonBar->EnableFrameTheme(!pRibbonBar->IsFrameThemeEnabled()); }
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CXTPFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; if (!m_wndStatusBar.Create(this)) return -1; if (!m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) return -1; if (!InitCommandBars()) return -1; CXTPCommandBars* pCommandBars = GetCommandBars(); if (pCommandBars == NULL) return -1; CXTPCommandBar* pMenuBar = pCommandBars->SetMenu(CTinyString(IDS_MENUBAR), IDR_MAINFRAME); if(pMenuBar == NULL) return -1; m_pToolbar = (CXTPToolBar*) pCommandBars->Add(CTinyString(IDS_STANDARD), xtpBarTop); if (!m_pToolbar || !m_pToolbar->LoadToolBar(IDR_MAINFRAME)) return -1; m_pToolbar->ShowTextBelowIcons(); m_pToolbar->EnableCustomization(FALSE); //m_pMapToolbar = (CXTPToolBar*) pCommandBars->Add(CTinyString(IDS_MAP), xtpBarTop); //if (!m_pMapToolbar || !m_pMapToolbar->LoadToolBar(IDR_MAP)) // return -1; //m_pMapToolbar->ShowTextBelowIcons(); pCommandBars->GetCommandBarsOptions()->bAlwaysShowFullMenus = FALSE; pCommandBars->GetShortcutManager()->SetAccelerators(IDR_MAINFRAME); LoadCommandBars(_T("CommandBars")); m_paneManager.InstallDockingPanes(this); CXTPPaintManager::SetTheme(xtpThemeRibbon); m_wndNavigatorBar.SetTheme(xtpShortcutThemeOffice2007); // EnableOffice2007Frame(GetCommandBars()); m_wndNavigatorBar.SetBindWnd(&m_pView->GetMapWnd(),&m_pView->GetListDlg(), &m_pView->GetBkgndDlg(),&m_pView->GetPicCtrl()); return 0; }
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CXTPFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; // Enable/Disable XP GUI Mode // xtAfxData.bXPMode = TRUE; // Enable/Disable Menu Shadows // xtAfxData.bMenuShadows = TRUE; if (!InitCommandBars()) return -1; CXTPPaintManager::SetTheme(xtpThemeOffice2003); //xtpThemeVisualStudio2008 CXTPCommandBars* pCommandBars = GetCommandBars(); CXTPCommandBar* pMenuBar; pMenuBar = pCommandBars->SetMenu(_T("Menu Bar"), IDR_MAINFRAME); pMenuBar->SetFlags(xtpFlagIgnoreSetMenuMessage | xtpFlagHideMDIButtons); //main IDR_MAINFRAME /* if (!m_wndMenuBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndMenuBar.LoadMenuBar(IDR_MAINFRAME)) { TRACE0("Failed to create menubar\n"); return -1; // fail to create m_wndMenuBar }*/ if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return -1; // fail to create } // m_wndMenuBar.EnableDockingEx(CBRS_ALIGN_ANY, CBRS_XT_SEMIFLAT); // m_wndToolBar.EnableDockingEx(CBRS_ALIGN_ANY, CBRS_XT_SEMIFLAT); // EnableDockingEx(CBRS_ALIGN_ANY, CBRS_XT_SEMIFLAT); // DockControlBar(&m_wndMenuBar); // DockControlBar(&m_wndToolBar); // InstallCoolMenus(IDR_MAINFRAME); ///////////////装入数据库信息//////////////// // m_sql.Init(); // if(m_sql.Connect(_T("masterdefine"),_T("kj86"),_T("kj86"))) { // AfxMessageBox("NetThread:无法连接用户参数数据库,请确定SQL SERVER服务是否运行!"); // return 0; } // LoadPointInfo(); return 0; }
void DialogBehaviorTreeEditor::_LoadIcon() { CXTPImageManager* imgMgr = GetCommandBars()->GetImageManager(); UINT icon[1] = { IDC_BTEditor_Arrange }; imgMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_BTEditor_Validate; imgMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_BTEditor_Save; imgMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_BTEditor_AddOwnParam; imgMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_BTEditor_AddRaceParam; imgMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_BTEditor_AddSequenceNode; imgMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_BTEditor_AddConditionNode; imgMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_BTEditor_AddActionNode; imgMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_BTEditor_Sync; imgMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_BTEditor_Delete; imgMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_BTEditor_Refresh; imgMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_BTEditor_NewBT; imgMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); }
BOOL CXTPRibbonTabPopupToolBar::ProcessSpecialKey(XTPSpecialKey key) { if (key != xtpKeyEscape) HideKeyboardTips(); if (CXTPRibbonScrollableBar::ProcessSpecialKey(key)) return TRUE; if (key == xtpKeyEscape && !m_pRibbonBar->m_bKeyboardSelect) { GetCommandBars()->ClosePopups(); return TRUE; } return CXTPPopupToolBar::ProcessSpecialKey(key); }
void DialogBehaviorTreeEditor::_CreateRibbon() { CXTPPaintManager::SetTheme(xtpThemeRibbon); ///Ribbon CXTPRibbonBar* pRibbonBar = (CXTPRibbonBar*)GetCommandBars()->Add(_T("Ribbon"), xtpBarTop, RUNTIME_CLASS(CXTPRibbonBar)); pRibbonBar->ShowCaptionAlways(FALSE); pRibbonBar->ShowQuickAccess(FALSE); ///RibbonHome CXTPRibbonTab* pTab = pRibbonBar->AddTab(L"Home"); //RibbonHome - GroupHome CXTPRibbonGroup* pGroup = pTab->AddGroup(L"Home"); //RibbonHome - GroupHome - NewBT pGroup->Add(xtpControlButton, IDC_BTEditor_NewBT); //RibbonHome - GroupHome - Refresh pGroup->Add(xtpControlButton, IDC_BTEditor_Refresh); //RibbonHome - GroupHome - Arrange pGroup->Add(xtpControlButton, IDC_BTEditor_Arrange); //RibbonHome - GroupHome - Validate pGroup->Add(xtpControlButton, IDC_BTEditor_Validate); // //RibbonHome - GroupHome - Sync // pGroup->Add(xtpControlButton, IDC_BTEditor_Sync); //RibbonHome - GroupHome - Save pGroup->Add(xtpControlButton, IDC_BTEditor_Save); //RibbonHome - GroupBlackboard pGroup = pTab->AddGroup(L"Blackboard"); //RibbonHome - GroupBlackboard - AddOwn pGroup->Add(xtpControlButton, IDC_BTEditor_AddOwnParam); //RibbonHome - GroupBlackboard - AddGlobal pGroup->Add(xtpControlButton, IDC_BTEditor_AddRaceParam); //RibbonHome - GroupEdit pGroup = pTab->AddGroup(L"Edit"); //RibbonHome - GroupEdit - Sequence pGroup->Add(xtpControlButton, IDC_BTEditor_AddSequenceNode); //RibbonHome - GroupEdit - Condition pGroup->Add(xtpControlButton, IDC_BTEditor_AddConditionNode); //RibbonHome - GroupEdit - Action pGroup->Add(xtpControlButton, IDC_BTEditor_AddActionNode); //RibbonHome - GroupEdit - Delete pGroup->Add(xtpControlButton, IDC_BTEditor_Delete); }
void CMainFrame::_LoadIcon() { CXTPImageManager* pImageMgr = GetCommandBars()->GetImageManager(); UINT uiSystemMenu[] = { ID_FILE_NEW, ID_FILE_OPEN, ID_FILE_SAVE }; pImageMgr->SetIcons(IDB_SYSTEMMENULARGE, uiSystemMenu, _countof(uiSystemMenu), CSize(32, 32)); UINT uCommand = {IDB_GEAR}; pImageMgr->SetIcons(IDB_GEAR, &uCommand, 1, CSize(0, 0), xtpImageNormal); UINT icon[1] = {IDC_Object_Move}; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Object_Rotate; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Object_Scale; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Object_Select; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Object_Remove; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Effect_Shadow; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Effect_SSAO; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Effect_Sharpen; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); icon[0] = IDC_Effect_FXAA; pImageMgr->SetIcons(IDB_Button, icon, _countof(icon), CSize(32, 32)); }
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 CXTPRibbonGroupPopupToolBar::OnMouseMove(UINT nFlags, CPoint point) { CXTPCommandBars* pCommandBars = GetCommandBars (); CXTPMouseManager* pMouseManager = pCommandBars->GetMouseManager(); BOOL bMouseLocked = pMouseManager->IsMouseLocked() || !pMouseManager->IsTopParentActive(m_hWnd) || pMouseManager->IsTrackedLock(this) || m_nPopuped != -1; CXTPRibbonGroup* pHighlightedGroup = bMouseLocked || !m_pRibbonBar->GetRibbonPaintManager()->m_bHotTrackingGroups ? NULL : m_pRibbonGroup; if (pHighlightedGroup != m_pHighlightedGroup) { HighlightGroup(pHighlightedGroup); if (m_pHighlightedGroup) { pMouseManager->TrackMouseLeave(*this); } } CXTPPopupToolBar::OnMouseMove(nFlags, point); }
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(); } }
void CMainFrame::RefreshRibbonBar() { GetCommandBars()->RedrawCommandBars(); }
bool CMainFrame::_OnCreateRibbon() { // Initialize the command bars if (!InitCommandBars()) return false; // Get a pointer to the command bars object. CXTPCommandBars* pCommandBars = GetCommandBars(); if(pCommandBars == NULL) return false; CXTPPaintManager::SetTheme(xtpThemeRibbon); //关闭默认菜单 ::SetMenu(m_hWnd, nullptr); m_hMenuDefault = nullptr; m_dwMenuBarState = AFX_MBS_HIDDEN; //初始化图标 _LoadIcon(); ///Ribbon CXTPRibbonBar* pRibbonBar = (CXTPRibbonBar*)pCommandBars->Add(_T("Ribbon"), xtpBarTop, RUNTIME_CLASS(CXTPRibbonBar)); if (!pRibbonBar) return false; pRibbonBar->EnableDocking(0); //pRibbonBar->GetTabPaintManager()->m_bSelectOnButtonDown = FALSE; ///创建系统按钮 CXTPControlPopup* pControlFile = (CXTPControlPopup*)pRibbonBar->AddSystemButton(); pControlFile->SetIconId(IDB_GEAR); CMenu sysMenu; sysMenu.LoadMenu(IDR_MAINFRAME); CXTPPopupBar* pCommandBar = new CXTPRibbonSystemPopupBar(); pCommandBar->SetCommandBars(pCommandBars); pControlFile->SetCommandBar(pCommandBar); pCommandBar->InternalRelease(); pCommandBar->LoadMenu(sysMenu.GetSubMenu(0)); pCommandBar->SetIconSize(CSize(32, 32)); ///RibbonHome CXTPRibbonTab* pTab = pRibbonBar->AddTab(L"Home"); //RibbonHome - GroupObject CXTPRibbonGroup* pGroup = pTab->AddGroup(L"Object"); //RibbonHome - GroupObject - Select pGroup->Add(xtpControlButton, IDC_Object_Select); //RibbonHome - GroupObject - Move pGroup->Add(xtpControlButton, IDC_Object_Move); //RibbonHome - GroupObject - Rotate pGroup->Add(xtpControlButton, IDC_Object_Rotate); //RibbonHome - GroupObject - Scale pGroup->Add(xtpControlButton, IDC_Object_Scale); //RibbonHome - GroupObject - Rmove pGroup->Add(xtpControlButton, IDC_Object_Remove); ///RibbonEffect pTab = pRibbonBar->AddTab(L"Effect"); //RibbonEffect - GroupSwitch pGroup = pTab->AddGroup(L"Switch"); //RibbonEffect - GroupSwitch - Shadow pGroup->Add(xtpControlButton, IDC_Effect_Shadow); //RibbonEffect - GroupSwitch - SSAO pGroup->Add(xtpControlButton, IDC_Effect_SSAO); //RibbonEffect - GroupSwitch - Sharpen pGroup->Add(xtpControlButton, IDC_Effect_Sharpen); //RibbonEffect - GroupSwitch - FXAA pGroup->Add(xtpControlButton, IDC_Effect_FXAA); return true; }
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { AfxGetApp()->m_nCmdShow = SW_HIDE; if (CFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; //界面居中显示 this ->CenterWindow(CWnd::GetDesktopWindow()); if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return -1; // fail to create } m_wndStatusBar.SetPaneInfo(0, m_wndStatusBar.GetItemID(0), SBPS_STRETCH, NULL); m_wndStatusBar.SetPaneInfo(1, m_wndStatusBar.GetItemID(1), SBPS_NORMAL, 180); m_wndStatusBar.SetPaneInfo(2, m_wndStatusBar.GetItemID(2), SBPS_NORMAL, 100); m_wndStatusBar.SetPaneInfo(3, m_wndStatusBar.GetItemID(3), SBPS_NORMAL, 100); m_wndStatusBar.SetPaneInfo(4, m_wndStatusBar.GetItemID(4), SBPS_NORMAL, NULL); m_wndStatusBar.SetPaneInfo(5, m_wndStatusBar.GetItemID(5), SBPS_NORMAL, NULL); m_wndStatusBar.SetPaneInfo(6, m_wndStatusBar.GetItemID(6), SBPS_NORMAL, NULL); /////////////////////////////////////////////////////////////////////////////////////// m_wndStatusBar.EnableCustomization(); if (!m_TrayIcon.Create(_T(""), // Toolktip text this, // Parent window IDR_MAINFRAME, // Icon resource ID IDR_MINIMIZE, // Resource ID of popup menu IDM_SHOW, // Default menu item for popup menu false)) // True if default menu item is located by position { TRACE0("Failed to create tray icon\n"); return -1; } if (!InitCommandBars()) { return -1; } CXTPCommandBars* pCommandBars = GetCommandBars(); CXTPCommandBar* pMenuBar = pCommandBars->SetMenu(_T("Menu Bar"), IDR_MAINFRAME); pMenuBar->SetFlags(xtpFlagAddMDISysPopup); CXTPToolBar* pCommandBar = (CXTPToolBar*)pCommandBars->Add(_T("Standard"), xtpBarTop); if (!pCommandBar || !pCommandBar->LoadToolBar(IDR_TOOLBAR3)) { TRACE0("Failed to create toolbar\n"); return -1; }; pCommandBars->GetCommandBarsOptions()->bShowTextBelowIcons = TRUE; pCommandBars->GetCommandBarsOptions()->ShowKeyboardCues(xtpKeyboardCuesShowWindowsDefault); m_paneManager.InstallDockingPanes(this); m_paneManager.SetTheme(xtpPaneThemeWinExplorer); CXTPDockingPane* pwndPaneLog = CreatePane(300, 141, RUNTIME_CLASS(CLogView), _T("日志信息"), xtpPaneDockBottom); CXTPDockingPane* pwndPaneShortcuts = CreatePane(200, 145, RUNTIME_CLASS(CShortcuts), _T("快捷功能"), xtpPaneDockRight,pwndPaneLog); CXTPDockingPane* pwndPaneIPUP = CreatePane(200, 145, RUNTIME_CLASS(CIPUpdate), _T("域名更新"), xtpPaneDockRight,pwndPaneLog); pwndPaneIPUP->Select(); m_paneManager.AttachPane( pwndPaneIPUP ,pwndPaneShortcuts ); pwndPaneShortcuts->SetOptions(xtpPaneNoCaption); pwndPaneIPUP->SetOptions(xtpPaneNoCaption); XTPColorManager()->DisableLunaColors(TRUE); CXTPPaintManager::SetTheme(xtpThemeOffice2003); LoadCommandBars(_T("CommandBars")); SetTimer(1,1000,NULL); return 0; }
void CMainFrame::OnUpdateFrameTheme(CCmdUI* pCmdUI) { CXTPRibbonBar* pRibbonBar = (CXTPRibbonBar*)GetCommandBars()->GetAt(0); pCmdUI->SetCheck(pRibbonBar->IsFrameThemeEnabled() ? TRUE : FALSE); }
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return -1; // fail to create } if (!InitCommandBars()) return -1; CXTPPaintManager::SetTheme(xtpThemeOffice2003); CXTPCommandBars* pCommandBars = GetCommandBars(); pCommandBars->SetMenu(_T("Menu Bar"), IDR_MAINFRAME); CXTPToolBar* pCommandBar = (CXTPToolBar*)pCommandBars->Add(_T("Standard"), xtpBarTop); if (!pCommandBar || !pCommandBar->LoadToolBar(IDR_MAINFRAME)) { TRACE0("Failed to create toolbar\n"); return -1; } pCommandBars->GetImageManager()->SetIcons(IDR_MAINFRAME, IDR_TOOLBAR_ALPHA); pCommandBars->GetShortcutManager()->SetAccelerators(IDR_MAINFRAME); // Load the previous state for command bars. LoadCommandBars(_T("CommandBars")); EnableDocking(CBRS_ALIGN_ANY); SetOfficeTheme(xtpCalendarThemeOffice2007); // Initialize dialog bar if (!m_dlgDatePicker.Create(this, IDD_DATEPICKER, CBRS_LEFT|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_HIDE_INPLACE, ID_VIEW_DATEPICKER)) return -1; // fail to create // Initialize dialog bar if (!m_dlgOptions.Create(this, IDD_CALENDAR_DEMO_VIEW, CBRS_ALIGN_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_HIDE_INPLACE, ID_VIEW_PROPERTIES)) return -1; // fail to create //m_dlgOptions.EnableDocking(CBRS_ALIGN_ANY); m_dlgOptions.EnableDocking(0); m_dlgOptions.SetWindowText(_T("Options")); ShowControlBar(&m_dlgOptions, FALSE, FALSE); FloatControlBar(&m_dlgOptions, CPoint(100, 200)); // docking for DatePicker m_dlgDatePicker.EnableDocking(CBRS_ALIGN_LEFT); m_dlgDatePicker.SetWindowText(_T("Date Picker")); ShowControlBar(&m_dlgDatePicker, TRUE, FALSE); //FloatControlBar(&m_dlgDatePicker, CPoint(100, GetSystemMetrics(SM_CYSCREEN) / 3)); return 0; }
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { AfxGetApp()->m_nCmdShow = SW_HIDE; if (CFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; this->CenterWindow(CWnd::GetDesktopWindow()); if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return -1; // fail to create } if (!InitCommandBars()) return -1; CXTPCommandBars* pCommandBars = GetCommandBars(); if(pCommandBars == NULL) { TRACE0("Failed to create command bars object.\n"); return -1; // fail to create } //设置下面状态栏 m_wndStatusBar.SetPaneInfo(0, m_wndStatusBar.GetItemID(0), SBPS_STRETCH, NULL); m_wndStatusBar.SetPaneInfo(1, m_wndStatusBar.GetItemID(1), SBPS_NORMAL, 250); m_wndStatusBar.SetPaneInfo(2, m_wndStatusBar.GetItemID(2), SBPS_NORMAL, 120); m_wndStatusBar.SetPaneInfo(3, m_wndStatusBar.GetItemID(3), SBPS_NORMAL, 120); /* m_wndStatusBar.EnableCustomization(); if (!m_TrayIcon.Create(_T(""), // Toolktip text this, // Parent window IDR_MAINFRAME, // Icon resource ID IDR_MINIMIZE, // Resource ID of popup menu IDM_SHOW, // Default menu item for popup menu false)) // True if default menu item is located by position { TRACE0("Failed to create tray icon\n"); return -1; } */ if (!InitCommandBars()) { return -1; } // CXTPCommandBars* pCommandBars = GetCommandBars(); CXTPCommandBar* pMenuBar = pCommandBars->SetMenu(_T("Menu Bar"), IDR_MAINFRAME); pMenuBar->SetFlags(xtpFlagAddMDISysPopup); /* CXTPToolBar* pCommandBar = (CXTPToolBar*)pCommandBars->Add(_T("Standard"), xtpBarTop); if (!pCommandBar || !pCommandBar->LoadToolBar(IDR_TOOLBAR3)) { TRACE0("Failed to create toolbar\n"); return -1; }; */ CXTPToolBar* pCommandBar = (CXTPToolBar*)pCommandBars->Add(_T("工具栏(T)"), xtpBarTop); if (!pCommandBar || !pCommandBar->LoadToolBar(IDR_TOOLBAR3)) // { TRACE0("Failed to create toolbar\n"); return -1; } pCommandBars->GetCommandBarsOptions()->bShowTextBelowIcons = TRUE; pCommandBars->GetCommandBarsOptions()->ShowKeyboardCues(xtpKeyboardCuesShowWindowsDefault); /* // Create ToolBar CXTPToolBar* pCommandBar = (CXTPToolBar*)pCommandBars->Add(_T("工具栏(T)"), xtpBarTop); if (!pCommandBar || !pCommandBar->LoadToolBar(IDR_TOOLBAR3)) // { TRACE0("Failed to create toolbar\n"); return -1; } // LoadIcons(); CXTPCommandBarsOptions* pOptions = pCommandBars->GetCommandBarsOptions(); pOptions->bShowExpandButtonAlways= FALSE; pOptions->bShowTextBelowIcons = true; pOptions->bLargeIcons = TRUE; pCommandBar->GetImageManager()->SetIcons(IDR_TOOLBAR3,IDB_BITMAP1); RedrawWindow(0, 0, RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE|RDW_ALLCHILDREN); GetCommandBars()->GetPaintManager()->RefreshMetrics(); ModifyStyle(WS_THICKFRAME, 0); ModifyStyle(0, WS_THICKFRAME); pCommandBars->GetCommandBarsOptions()->ShowKeyboardCues(xtpKeyboardCuesShowNever); */ m_paneManager.InstallDockingPanes(this); m_paneManager.SetTheme(xtpPaneThemeVisualStudio2010); // 设置主题 CXTPDockingPane* pwndPaneLog = CreatePane(235, 150, RUNTIME_CLASS(CLogView), _T("日志信息"), xtpPaneDockBottom); CXTPDockingPane* pwndPaneNum = CreatePane(58, 150, RUNTIME_CLASS(CShowNum), _T("主机统计"), xtpPaneDockRight, pwndPaneLog); // CXTPDockingPane* pwndPaneChoose = CreatePane(235, 150, RUNTIME_CLASS(CMoreChoose), _T("筛选主机"), xtpPaneDockBottom); CXTPDockingPane* pwndPaneUPDATEIP = CreatePane(235, 150, RUNTIME_CLASS(CUPDATEIP), _T("域名更新"), xtpPaneDockBottom); // CXTPDockingPane* pwndPaneBatch = CreatePane(235, 150, RUNTIME_CLASS(CBatch), _T("批量命令"), xtpPaneDockBottom); // CXTPDockingPane* pwndPaneplay = CreatePane(260, 145, RUNTIME_CLASS(CBuildServer), _T("整蛊娱乐"), xtpPaneDockBottom); CXTPDockingPane* pwndPaneproxy = CreatePane(235, 150, RUNTIME_CLASS(CProxy), _T("远程连接"), xtpPaneDockBottom); // m_paneManager.AttachPane( pwndPaneChoose, pwndPaneLog ); m_paneManager.AttachPane( pwndPaneUPDATEIP, pwndPaneLog); // m_paneManager.AttachPane( pwndPaneBatch, pwndPaneChoose); m_paneManager.AttachPane( pwndPaneproxy, pwndPaneUPDATEIP ); pwndPaneLog->Select(); pwndPaneLog->SetOptions(xtpPaneNoCaption); pwndPaneNum->SetOptions(xtpPaneNoCaption); // pwndPaneChoose->SetOptions(xtpPaneNoCaption); pwndPaneUPDATEIP->SetOptions(xtpPaneNoCaption); // pwndPaneBatch->SetOptions(xtpPaneNoCaption); // pwndPaneplay->SetOptions(xtpPaneNoCaption); pwndPaneproxy->SetOptions(xtpPaneNoCaption); /* XTPColorManager()->DisableLunaColors(TRUE); CXTPPaintManager::SetTheme(xtpThemeOffice2003); LoadCommandBars(_T("CommandBars")); SetTimer(1,1000,NULL); */ m_hDrawIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); m_hEmptyIcon = AfxGetApp()->LoadIcon(IDI_SYSTRAY1); m_NotifyIcon.cbSize = sizeof(NOTIFYICONDATA); m_NotifyIcon.hWnd = this->GetSafeHwnd(); CString Lineips = Onlinetips(); CString Lineips1 = OnVoicepromptsm(); wsprintf(m_NotifyIcon.szTip,"主机数量: %d台\n语音: %s\n消息提示: %s",Zjshulian,Lineips1,Lineips); m_NotifyIcon.uCallbackMessage = WM_ICONMESSAGE; m_NotifyIcon.uFlags = NIF_MESSAGE|NIF_TIP|NIF_ICON; m_NotifyIcon.hIcon = m_hDrawIcon; m_NotifyIcon.uID = IDR_MAINFRAME; Shell_NotifyIcon(NIM_ADD, &m_NotifyIcon); //初始化记录值 // m_nCurrent = 0; // SetTimer(1, 500, NULL); //开启定时器 1 return 0; }
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return -1; // fail to create } // Initialize the command bars if (!InitCommandBars()) return -1; // Get a pointer to the command bars object. CXTPCommandBars* pCommandBars = GetCommandBars(); if(pCommandBars == NULL) { TRACE0("Failed to create command bars object.\n"); return -1; // fail to create } // Add the menu bar CXTPCommandBar* pMenuBar = pCommandBars->SetMenu( _T("Menu Bar"), IDR_MAINFRAME); if(pMenuBar == NULL) { TRACE0("Failed to create menu bar.\n"); return -1; // fail to create } // Create ToolBar CXTPToolBar* pToolBar = (CXTPToolBar*) pCommandBars->Add(_T("Standard"), xtpBarTop); if (!pToolBar || !pToolBar->LoadToolBar(IDR_MAINFRAME)) { TRACE0("Failed to create toolbar\n"); return -1; } // Set Windows XP Theme CXTPPaintManager::SetTheme(xtpThemeNativeWinXP); // Hide array of commands pCommandBars->HideCommands(uHideCmds, _countof(uHideCmds)); // Set "Always Show Full Menus" option to the FALSE pCommandBars->GetCommandBarsOptions()->bAlwaysShowFullMenus = FALSE; pCommandBars->GetShortcutManager()->SetAccelerators(IDR_MAINFRAME); // Load the previous state for toolbars and menus. LoadCommandBars(_T("CommandBars")); // Initialize the docking pane manager and set the // initial them for the docking panes. Do this only after all // control bars objects have been created and docked. m_paneManager.InstallDockingPanes(this); // Set Windows XP Theme m_paneManager.SetTheme(xtpPaneThemeWinNative); // Create docking panes. CXTPDockingPane* pwndPane1 = m_paneManager.CreatePane( IDR_PANE_OPTIONS, CRect(0, 0,200, 120), xtpPaneDockLeft); CXTPDockingPane* pwndPane2 = m_paneManager.CreatePane( IDR_PANE_PROPERTIES, CRect(0, 0,200, 120), xtpPaneDockBottom, pwndPane1); // Set the icons for the docking pane tabs. int nIDIcons[] = {IDR_PANE_OPTIONS, IDR_PANE_PROPERTIES}; m_paneManager.SetIcons(IDB_BITMAP_ICONS, nIDIcons, _countof(nIDIcons), RGB(0, 255, 0)); // Load the previous state for docking panes. CXTPDockingPaneLayout layoutNormal(&m_paneManager); if (layoutNormal.Load(_T("NormalLayout"))) { m_paneManager.SetLayout(&layoutNormal); } return 0; }
bool CMainFrame::_OnCreateRibbon() { // Initialize the command bars if (!InitCommandBars()) return false; // Get a pointer to the command bars object. CXTPCommandBars* pCommandBars = GetCommandBars(); if(pCommandBars == NULL) return false; CXTPPaintManager::SetTheme(xtpThemeRibbon); //关闭默认菜单 ::SetMenu(m_hWnd, nullptr); m_hMenuDefault = nullptr; m_dwMenuBarState = AFX_MBS_HIDDEN; //初始化图标 _LoadIcon(); ///Ribbon CXTPRibbonBar* pRibbonBar = (CXTPRibbonBar*)pCommandBars->Add(_T("Ribbon"), xtpBarTop, RUNTIME_CLASS(CXTPRibbonBar)); if (!pRibbonBar) return false; pRibbonBar->EnableDocking(0); //pRibbonBar->GetTabPaintManager()->m_bSelectOnButtonDown = FALSE; ///创建系统按钮 CXTPControlPopup* pControlFile = (CXTPControlPopup*)pRibbonBar->AddSystemButton(); pControlFile->SetIconId(IDB_GEAR); CMenu sysMenu; sysMenu.LoadMenu(IDR_MAINFRAME); CXTPPopupBar* pCommandBar = new CXTPRibbonSystemPopupBar(); pCommandBar->SetCommandBars(pCommandBars); pControlFile->SetCommandBar(pCommandBar); pCommandBar->InternalRelease(); pCommandBar->LoadMenu(sysMenu.GetSubMenu(0)); pCommandBar->SetIconSize(CSize(32, 32)); ///RibbonHome CXTPRibbonTab* pTab = pRibbonBar->AddTab(L"Home"); //RibbonHome - GroupObject CXTPRibbonGroup* pGroup = pTab->AddGroup(L"Object"); //RibbonHome - GroupObject - Select pGroup->Add(xtpControlButton, IDC_Object_Select); //RibbonHome - GroupObject - Move pGroup->Add(xtpControlButton, IDC_Object_Move); //RibbonHome - GroupObject - Rotate pGroup->Add(xtpControlButton, IDC_Object_Rotate); //RibbonHome - GroupObject - Scale pGroup->Add(xtpControlButton, IDC_Object_Scale); //RibbonHome - GroupObject - Rmove pGroup->Add(xtpControlButton, IDC_Object_Remove); ///RibbonHome - GroupTerrainModify pGroup = pTab->AddGroup(L"Terrain Modify"); //RibbonHome - GroupTerrainModify - Deform pGroup->Add(xtpControlButton, IDC_Terrain_Deform); //RibbonHome - GroupTerrainModify - Splat CXTPControlPopup* pBtn = dynamic_cast<CXTPControlPopup*>(pGroup->Add(xtpControlSplitButtonPopup, IDC_Terrain_Splat)); pBtn->GetCommandBar()->GetControls()->Add(xtpControlButton, IDC_Terrain_Splat_Layer0); pBtn->GetCommandBar()->GetControls()->Add(xtpControlButton, IDC_Terrain_Splat_Layer1); pBtn->GetCommandBar()->GetControls()->Add(xtpControlButton, IDC_Terrain_Splat_Layer2); pBtn->GetCommandBar()->GetControls()->Add(xtpControlButton, IDC_Terrain_Splat_Layer3); pBtn->GetCommandBar()->GetControls()->Add(xtpControlButton, IDC_Terrain_Splat_Layer4); //RibbonHome - GroupTerrainBrush pGroup = pTab->AddGroup(L"Terrain Brush"); //RibbonHome - GroupTerrainBrush - EditBrushSize CXTPControlEdit* pControl = (CXTPControlEdit*)pGroup->Add(xtpControlEdit, ID_Terrain_BrushSize1); pControl->ShowSpinButtons(TRUE); pControl = (CXTPControlEdit*)pGroup->Add(xtpControlEdit, ID_Terrain_BrushSize2); pControl->ShowSpinButtons(TRUE); //RibbonHome - GroupTerrainTexture pGroup = pTab->AddGroup(L"Layer Texture"); pGroup->SetControlsCentering(TRUE); m_terrainTexGallery = CXTPControlGalleryItems::CreateItems(pCommandBars, IDC_Terrain_LayerTexture); CXTPControlGallery* pControlGallery = (CXTPControlGallery*)pGroup->Add(new CXTPControlGallery(), IDC_Terrain_LayerTexture); pControlGallery->SetControlSize(CSize(250, 60)); //pControlGallery->SetResizable(); pControlGallery->SetItemsMargin(0, 1, 0, 1); pControlGallery->ShowLabels(FALSE); pControlGallery->ShowBorders(TRUE); pControlGallery->SetItems(m_terrainTexGallery); _CreateLayerTexIcon(); //RibbonHome - GroupVegetation pGroup = pTab->AddGroup(L"Vegetation"); //RibbonHome - GroupVegetation - Grass pGroup->Add(xtpControlButton, IDC_Vegetation_Grass); ///RibbonEffect pTab = pRibbonBar->AddTab(L"Effect"); //RibbonEffect - GroupSwitch pGroup = pTab->AddGroup(L"Switch"); //RibbonEffect - GroupSwitch - Shadow pGroup->Add(xtpControlButton, IDC_Effect_Shadow); //RibbonEffect - GroupSwitch - SSAO pGroup->Add(xtpControlButton, IDC_Effect_SSAO); //RibbonEffect - GroupSwitch - Sharpen pGroup->Add(xtpControlButton, IDC_Effect_Sharpen); //RibbonEffect - GroupSwitch - FXAA pGroup->Add(xtpControlButton, IDC_Effect_FXAA); ///RibbonAnimation m_animTab = pRibbonBar->InsertTab(-1, L"Animation"); m_animTab->SetContextTab(xtpRibbonTabContextColorRed, L"Animation"); //选中了带动画物体才显示 m_animTab->SetVisible(FALSE); //RibbonAnimation - GroupAnim pGroup = m_animTab->AddGroup(L"Anim"); //RibbonAnimation - GroupAnim - AnimList m_animList = dynamic_cast<CXTPControlComboBox*>(pGroup->Add(xtpControlComboBox, IDC_Animation_Names)); m_animList->SetDropDownListStyle(); m_animList->SetWidth(150); //RibbonAnimation - GroupAnim - Play pGroup->Add(xtpControlButton, IDC_Animation_Play); //RibbonAnimation - GroupAnim - Stop pGroup->Add(xtpControlButton, IDC_Animation_Stop); //RibbonAnimation - GroupEffect pGroup = m_animTab->AddGroup(L"Effect"); //RibbonAnimation - GroupEffect - EffectList m_effectList = dynamic_cast<CXTPControlComboBox*>(pGroup->Add(xtpControlComboBox, IDC_Animation_EffectList)); m_effectList->SetDropDownListStyle(); m_effectList->SetWidth(150); //RibbonAnimation - GroupEffect - AddEffect CXTPControlPopup* pAddBtn = dynamic_cast<CXTPControlPopup*>(pGroup->Add(xtpControlSplitButtonPopup, IDC_Effect_Add)); pAddBtn->GetCommandBar()->GetControls()->Add(xtpControlButton, IDC_Effect_AddParticle); pAddBtn->GetCommandBar()->GetControls()->Add(xtpControlButton, IDC_Effect_AddEntityEffect); pAddBtn->GetCommandBar()->GetControls()->Add(xtpControlButton, IDC_Effect_AddDLight); //RibbonAnimation - GroupEffect - EffectRemove pGroup->Add(xtpControlButton, IDC_Animation_EffectRemove); return true; }