Exemple #1
0
void CMainFrame::Add_Category1()
{
	CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Buttons"), IDB_RIBBON_CATEGORY1_SMALL, IDB_RIBBON_CATEGORY1_LARGE);

	CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Large Buttons"));

	std::auto_ptr<CMFCRibbonButton> apBtn1(new CMFCRibbonButton(ID_RIBBON_BTN_1, _T("Button"), 0, 0));
	apBtn1->SetAlwaysLargeImage();
	pPanel1->Add(apBtn1.release());

	std::auto_ptr<CMFCRibbonButton> apBtn2(new CMFCRibbonButton(ID_RIBBON_BTN_2, _T("Menu Button"), 1, 1));
	apBtn2->SetMenu(IDR_RIBBON_MENU_1);
	apBtn2->SetAlwaysLargeImage();
	pPanel1->Add(apBtn2.release());

	std::auto_ptr<CMFCRibbonButton> apBtn3(new CMFCRibbonButton(ID_RIBBON_BTN_3, _T("Split Button"), 2, 2));
	apBtn3->SetMenu(IDR_RIBBON_MENU_1, TRUE);
	apBtn3->SetAlwaysLargeImage();
	apBtn3->RemoveSubItem(0);
	apBtn3->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MBTN_1, _T("Item 1"), 2), 0);
	pPanel1->Add(apBtn3.release());

	CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Small"));

	std::auto_ptr<CMFCRibbonButton> apBtn4(new CMFCRibbonButton(ID_RIBBON_BTN_4, _T("Button"), 3));
	pPanel2->Add(apBtn4.release());

	std::auto_ptr<CMFCRibbonButton> apBtn5(new CMFCRibbonButton(ID_RIBBON_BTN_5, _T("Menu Button"), 4));
	apBtn5->SetMenu(IDR_RIBBON_MENU_1);
	pPanel2->Add(apBtn5.release());

	std::auto_ptr<CMFCRibbonButton> apBtn6(new CMFCRibbonButton(ID_RIBBON_BTN_6, _T("Split Button"), 5));
	apBtn6->SetMenu(IDR_RIBBON_MENU_1, TRUE);
	apBtn6->SetAlwaysLargeImage();
	apBtn6->RemoveSubItem(1);
	apBtn6->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MBTN_2, _T("Item 2"), 5), 1);
	pPanel2->Add(apBtn6.release());

	CMFCRibbonPanel* pPanel3 = pCategory->AddPanel(_T("Check Boxes"));

	pPanel3->Add(new CMFCRibbonCheckBox(ID_RIBBON_BTN_7, _T("Check Box 1")));
	pPanel3->Add(new CMFCRibbonCheckBox(ID_RIBBON_BTN_8, _T("Check Box 2")));
	pPanel3->Add(new CMFCRibbonCheckBox(ID_RIBBON_BTN_9, _T("Check Box 3")));

	pPanel1->SetData(ID_RIBBON_SOURCE_CODE_1_1);
	pPanel2->SetData(ID_RIBBON_SOURCE_CODE_1_2);
	pPanel3->SetData(ID_RIBBON_SOURCE_CODE_1_3);
}
void CMyRibbonBar::addTabSupport()
{
	CMFCRibbonCategory* pCategory = AddCategory (
		_T("Support"),
		IDB_SUPPORT16,
		IDB_SUPPORT);
	CMFCRibbonPanel* pPanelLocalHelp =pCategory->AddPanel (_T("Local Help System"), m_PanelImages.ExtractIcon(0));
	pPanelLocalHelp->Add (new CMFCRibbonButton (WM_SUPPORT_CONTENTS, _T("Contents"), -1,8));
	//pPanelLocalHelp->Add (new CMFCRibbonButton (WM_MAINFRAME_SUPPORT_LOCAL_EXPERT, _T("Expert Help"), -1,10));
	pPanelLocalHelp->Add(new CMFCRibbonButton(WM_SUPPORT_TIPOFTHEDAY,_T("Tip of the day"),-1,9));

	CMFCRibbonPanel* pPanelOnlineSupport =pCategory->AddPanel (_T("Online support"), m_PanelImages.ExtractIcon(0));
	pPanelOnlineSupport->Add (new CMFCRibbonButton (WM_SUPPORT_HELPDESK, _T("System Help desk"), 4));
	pPanelOnlineSupport->Add (new CMFCRibbonButton (WM_SUPPORT_FORUMS, _T("Public forums"), 6));
	pPanelOnlineSupport->Add (new CMFCRibbonButton (WM_SUPPORT_MAILSUPPORT, _T("Mail Support"), 5));

	pPanelOnlineSupport->Add (new CMFCRibbonButton (WM_SUPPORT_TUTORIALS, _T("Articles"), 7));
	pPanelOnlineSupport->Add (new CMFCRibbonButton (WM_SUPPORT_FAQ, _T("FAQ"), 8));
	pPanelOnlineSupport->Add (new CMFCRibbonButton (WM_SUPPORT_UPDATE, _T("Update"), 9));

/*
	CMFCRibbonPanel* pPanelUpdate =pCategory->AddPanel (_T("Update"));
	pPanelUpdate->Add (new CMFCRibbonButton (ID_CHART_DESIGN_TYPE_CHANGE, _T("Update program"), -1,0));
*/


	CMFCRibbonPanel* pPanelLegalAndAbout =pCategory->AddPanel (_T("Product"), m_PanelImages.ExtractIcon(0));
	pPanelLegalAndAbout->Add (new CMFCRibbonButton (WM_SUPPORT_COPYRIGHT, _T("Copyright"), -1,11));
	pPanelLegalAndAbout->Add (new CMFCRibbonButton (WM_SUPPORT_LICENCEKEY, _T("Licence Key"), 10));
	pPanelLegalAndAbout->Add (new CMFCRibbonButton (WM_SUPPORT_ACTIVATE_PRODUCT, _T("Activate Product"), 11));
	pPanelLegalAndAbout->Add (new CMFCRibbonButton (WM_SUPPORT_ABOUT, _T("About"), 12));


	CMFCRibbonPanel* pPanelInvite =pCategory->AddPanel (_T("Links"), m_PanelImages.ExtractIcon(0));
	pPanelInvite->Add (new CMFCRibbonButton (WM_SUPPORT_VISIT, _T("Visit Potato Software"), -1,4));
	pPanelInvite->Add(new CMFCRibbonSeparator());

	pPanelInvite->Add(new CMFCRibbonLinkCtrl(WM_SUPPORT_INVITE, _T("Invite your friends"), _T("Invite your friends")));
	pPanelInvite->Add(new CMFCRibbonLinkCtrl(WM_SUPPORT_NEWS, _T("News"), _T("News")));
	pPanelInvite->Add(new CMFCRibbonLinkCtrl(WM_SUPPORT_PARTNER, _T("Partner with Potato Software"), _T("Partner with Potato Software")));
	pPanelInvite->Add(new CMFCRibbonSeparator());
	pPanelInvite->Add (new CMFCRibbonButton (WM_SUPPORT_GOOGLE_CODE, _T("Google code"), -1,10+4));
	pPanelInvite->Add (new CMFCRibbonButton (WM_SUPPORT_CODE_PROJECT, _T("Code Project"), -1,10+5));
	pPanelInvite->Add (new CMFCRibbonButton (WM_SUPPORT_BLOG, _T("Blog"), -1,13));

	
}
Exemple #3
0
void CMainFrame::Add_Category4()
{
	CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Groups"), IDB_RIBBON_CATEGORY4_SMALL, 0);

	CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("From Toolbar"));

	pPanel1->AddToolBar(IDR_TOOLBAR);

	CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Manual"));

	std::auto_ptr<CMFCRibbonButtonsGroup> apButtonsGroup1(new CMFCRibbonButtonsGroup);

	apButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_1, _T(""), 0));
	apButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_2, _T(""), 1));

	CMFCRibbonEdit* pEdit = new CMFCRibbonEdit(ID_RIBBON_GBTN_3, 65);
	pEdit->SetEditText(_T("Edit"));
	apButtonsGroup1->AddButton(pEdit);

	apButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_4, _T(""), 2));
	apButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_5, _T(""), 3));

	pPanel2->Add(apButtonsGroup1.release());

	std::auto_ptr<CMFCRibbonButtonsGroup> apButtonsGroup2(new CMFCRibbonButtonsGroup);
	apButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_6, _T(""), 4));
	apButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_7, _T(""), 5));
	apButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_8, _T(""), 6));
	apButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_9, _T(""), 7));
	
	pPanel2->Add(apButtonsGroup2.release());

	std::auto_ptr<CMFCRibbonButtonsGroup> apButtonsGroup3(new CMFCRibbonButtonsGroup);

	CMFCRibbonButton* pBtn10 = new CMFCRibbonButton(ID_RIBBON_GBTN_10, _T(""), 8);
	pBtn10->SetMenu(IDR_RIBBON_MENU_1);
	apButtonsGroup3->AddButton(pBtn10);

	CMFCRibbonButton* pBtn11 = new CMFCRibbonButton(ID_RIBBON_GBTN_11, _T(""), 9);
	pBtn11->SetMenu(IDR_RIBBON_MENU_1, TRUE);
	apButtonsGroup3->AddButton(pBtn11);

	pPanel2->Add(apButtonsGroup3.release());

	pPanel1->SetData(ID_RIBBON_SOURCE_CODE_4_1);
	pPanel2->SetData(ID_RIBBON_SOURCE_CODE_4_2);
}
void CMyRibbonBar::addTabExport()
{
	CMFCRibbonCategory* pCategory = AddCategory(_T("Export"), IDB_EXPORT16, IDB_EXPORT);



	CMFCRibbonPanel* pPanel = pCategory->AddPanel(_T("Chart"), m_PanelImages.ExtractIcon(20));
	pPanel->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_CHANGE, _T("Save\nc"), -1, 0));
/*
	pPanel->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_CHANGE, _T("PDF\nc"), -1, 0));
	pPanel->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_CHANGE, _T("Image\nc"), -1, 0));
*/

	pPanel = pCategory->AddPanel(_T("Data Values"), m_PanelImages.ExtractIcon(20));
	pPanel->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_CHANGE, _T("Add CVS\nc"), -1, 2));
	pPanel->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_CHANGE, _T("Add to Excel\nc"), -1, 1));


}
Exemple #5
0
void CMainFrame::InitViewCategory()
{
	CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&View"), IDB_RIBBON_VIEWSMALL, IDB_RIBBON_VIEWLARGE);

	// Create "Show/Hide" panel:
	CMFCRibbonPanel* pPanelShow = pCategory->AddPanel(_T("Show/Hide\nzs"), m_PanelImages.ExtractIcon(4));

	pPanelShow->Add(new CMFCRibbonCheckBox(ID_VIEW_GRID, _T("Grid Lines\ng")));
	pPanelShow->Add(new CMFCRibbonCheckBox(ID_VIEW_SHOWOBJECTS, _T("Show Objects\ns")));

	// Create "Window" panel:
	CMFCRibbonPanel* pPanelWindow = pCategory->AddPanel(_T("Window\nzw"), m_PanelImages.ExtractIcon(5));

	pPanelWindow->Add(new CMFCRibbonButton(ID_WINDOW_NEW, _T("New Window\nn"), 0, 0));

	CMFCRibbonButton* pBtnWindows = new CMFCRibbonButton(ID_WINDOWS_MENU, _T("Switch Windows\ns"), 1, 1);
	pBtnWindows->SetMenu(IDR_WINDOWS_MENU, TRUE);
	pBtnWindows->SetDefaultCommand(FALSE);
	pPanelWindow->Add(pBtnWindows);
}
Exemple #6
0
void CMainFrame::Add_Category2()
{
	CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Palette Buttons"), IDB_RIBBON_CATEGORY2_SMALL, IDB_RIBBON_CATEGORY2_LARGE);

	CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Standard"));

	pPanel1->Add(new CMFCRibbonGallery(ID_RIBBON_PBTN_1, _T("Embedded"), 0, 0, IDB_RIBBON_PALETTE_1, 64));

	std::auto_ptr<CMFCRibbonGallery> apBtn2(new CMFCRibbonGallery(ID_RIBBON_PBTN_2, _T("Button"), 1, 1, IDB_RIBBON_PALETTE_1, 64));
	apBtn2->SetButtonMode();
	apBtn2->SetAlwaysLargeImage();
	pPanel1->Add(apBtn2.release());

	CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Extended"));

	std::auto_ptr<CMFCRibbonGallery> apBtn3(new CMFCRibbonGallery(ID_RIBBON_PBTN_3, _T("Resize Vertical"), 2, 2, IDB_RIBBON_PALETTE_1, 64));
	apBtn3->SetButtonMode();
	apBtn3->SetIconsInRow(2);
	apBtn3->EnableMenuResize(TRUE, TRUE);
	pPanel2->Add(apBtn3.release());

	std::auto_ptr<CMFCRibbonGallery> apBtn4(new CMFCRibbonGallery(ID_RIBBON_PBTN_4, _T("Resize Both"), 3, 3, IDB_RIBBON_PALETTE_1, 64));
	apBtn4->SetButtonMode();
	apBtn4->SetIconsInRow(4);
	apBtn4->EnableMenuResize(TRUE);
	pPanel2->Add(apBtn4.release());

	std::auto_ptr<CMFCRibbonGallery> apBtn5(new CMFCRibbonGallery(ID_RIBBON_PBTN_5, _T("Groups && Subitems"), 4, 4));
	apBtn5->AddGroup(_T("Group 1"), IDB_RIBBON_PALETTE_1, 64);
	apBtn5->AddGroup(_T("Group 2"), IDB_RIBBON_PALETTE_2, 64);
	apBtn5->SetButtonMode();
	apBtn5->SetIconsInRow(4);
	apBtn5->EnableMenuResize(TRUE);
	apBtn5->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MENU_ITEM_1, _T("Item 1")));
	apBtn5->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MENU_ITEM_2, _T("Item 2")));
	apBtn5->AddSubItem(new CMFCRibbonButton(ID_RIBBON_MENU_ITEM_3, _T("Item 3")));
	pPanel2->Add(apBtn5.release());

	pPanel1->SetData(ID_RIBBON_SOURCE_CODE_2_1);
	pPanel2->SetData(ID_RIBBON_SOURCE_CODE_2_2);
}
void CMyRibbonBar::addTabHome()
{
	BOOL bNameValid;
	CString strTemp;


	CMFCRibbonCategory* pCategory = AddCategory(_T("Home"), IDB_WRITESMALL, IDB_WRITELARGE);

	// Create panel:
	CMFCRibbonPanel* pPanel = pCategory->AddPanel(_T("Connect to Data Sources"), m_PanelImages.ExtractIcon(3));

	pPanel->Add(new CMFCRibbonButton(WM_OPEN_TEST_FILE, _T("Single Test file"), -1, 5));
	pPanel->Add(new CMFCRibbonButton(WM_OPEN_TEST_SUITE, _T("Test suite"), -1, 4));
	pPanel->Add(new CMFCRibbonButton(WM_CONNECT_REMOTE, _T("connect to remote source"), -1, 1));

	pPanel = pCategory->AddPanel(_T("Edit and Synchronize"), m_PanelImages.ExtractIcon(3));


	pPanel->Add(new CMFCRibbonLabel(_T("Set Focus :")));
	CMFCRibbonComboBox* pCombo= new CMFCRibbonComboBox(WM_SELECT_FILEFOLDER, TRUE, -1,_T("Select File/Folder"),0);
	pPanel->Add(pCombo);
	pCombo = new CMFCRibbonComboBox(WM_SELECT_TEST, TRUE, -1,_T("Select Test"),7);
	pPanel->Add(pCombo);

	pPanel->SetJustifyColumns();



	pPanel->Add(new CMFCRibbonButton(WM_UPDATE_SUITE, _T("Update tests"), -1, 3));


	pPanel->InsertSeparator(5);

	pPanel->Add(new CMFCRibbonButton(WM_TEST_DESCRIPTION, _T("Description"), -1, 8));
	pPanel->Add(new CMFCRibbonButton(WM_TEST_DELETE, _T("Delete"), -1, 6));
	pPanel->Add(new CMFCRibbonButton(WM_TESTS_CLOSE, _T("Close"), -1, 7));

}
void CMyRibbonBar::addTabCompare()
{
	CMFCRibbonCategory* pCategory = AddCategory(_T("Compare"), IDB_ANALYZE16, IDB_COMPARE);

	CMFCRibbonPanel* pPanel = pCategory->AddPanel(_T("Selection"), m_PanelImages.ExtractIcon(13));

	pPanel->Add(new CMFCRibbonLabel(_T("Set Focus :")));
	CMFCRibbonComboBox* pSelectionCB = new CMFCRibbonComboBox(WM_COMPARE_FOCUS_SELTEST, TRUE, -1,_T("Select Test"),0);
/*
	pSelectionCB->AddItem(_T("Test1"),0);
	pSelectionCB->AddItem(_T("Test2"));
	pSelectionCB->SelectItem(0);*/

	pPanel->Add(pSelectionCB);

	pSelectionCB = new CMFCRibbonComboBox(WM_COMPARE_FOCUS_SELITEM, TRUE, -1,_T("Select Item"),7);
/*
	pSelectionCB->AddItem(_T("ActivityA"),0);
	pSelectionCB->AddItem(_T("Task T1"));
	pSelectionCB->SelectItem(0);*/

	pPanel->Add(pSelectionCB);

	pPanel->SetJustifyColumns();

//
	pPanel = pCategory->AddPanel(_T("Single Activity"), m_PanelImages.ExtractIcon(18));

	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEACTIVITY_TIMELINE, _T("Show TimeLine"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEACTIVITY_STAGES, _T("Differenced events"), -1, 1));

	pPanel->AddSeparator();
	pPanel->Add(new CMFCRibbonLabel(_T("Select Task :")));
	pSelectionCB = new CMFCRibbonComboBox(WM_COMPARE_SINGLEACTIVITY_SELTASK, TRUE, -1,_T("Task :"),3);
/*
	pSelectionCB->AddItem(_T("Task T0"),0);
	pSelectionCB->AddItem(_T("Task T1"));
	pSelectionCB->SelectItem(0);*/

	pPanel->Add(pSelectionCB);
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEACTIVITY_WITHTASK_STACKED, _T("Stacked"), 0, 2));
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEACTIVITY_WITHTASK_TOTAL, _T("Total Times"), 0, 3));
	//
	pPanel->AddSeparator();
	pPanel->Add(new CMFCRibbonLabel(_T("Select Worker :")));
	pSelectionCB = new CMFCRibbonComboBox(WM_COMPARE_SINGLEACTIVITY_SELWORKER, TRUE, -1,_T("Thread :"),1);
	/*
	pSelectionCB->AddItem(_T("Worker T0"),0);
		pSelectionCB->AddItem(_T("Thread T1"));
		pSelectionCB->SelectItem(0);*/
	
	pPanel->Add(pSelectionCB);
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEACTIVITY_WITHWORKER_TOTAL, _T("Time Total"), 0, 4));

	pPanel = pCategory->AddPanel(_T("All Activities"), m_PanelImages.ExtractIcon(18));

	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SALLACTIVITIES_TOTAL, _T("Total time"), 0, 7));


	pPanel = pCategory->AddPanel(_T("Single Task"), m_PanelImages.ExtractIcon(19));

	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLETASK_RUNHISTO, _T("Runs History"), 0, 5));
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLETASK_TOTAL, _T("Total Time"), -1, 6));

	pPanel = pCategory->AddPanel(_T("All Tasks"), m_PanelImages.ExtractIcon(19));

	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_ALLTASKS_TOTAL, _T("Total Time"), 0, 8));


	pPanel = pCategory->AddPanel(_T("Worker"), m_PanelImages.ExtractIcon(17));

	//pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEWORKER_RUNPAUSE, _T("Run|Pause Time"), 0, 10));
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEWORKER_RUNHISTO, _T("Run History"), 0, 11));
	pPanel->AddSeparator();

	pPanel->Add(new CMFCRibbonLabel(_T("Select Task :")));
	pSelectionCB = new CMFCRibbonComboBox(WM_COMPARE_SINGLEWORKER_SELTASK, TRUE, -1,_T("Task :"),3);
	/*
	pSelectionCB->AddItem(_T("Task T0"),0);
		pSelectionCB->AddItem(_T("Task T1"));
		pSelectionCB->SelectItem(0);*/
	
	pPanel->Add(pSelectionCB);
	/*pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEWORKER_WITHTASK_STACKED, _T("Stacked"), 0, 0));*/
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEWORKER_WITHTASK_TOTAL, _T("Time Total"), 0, 12));

	pPanel = pCategory->AddPanel(_T("All Workers"), m_PanelImages.ExtractIcon(27));
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_ALLWORKERS_TOTAL, _T("Total Times"), 0, 13));

	

}
void CMyRibbonBar::addTabAnalyze()
{
	CMFCRibbonCategory* pCategory = AddCategory(_T("Analyze"), IDB_ANALYZE16, IDB_ANALYZE);

	CMFCRibbonPanel* pPanel = pCategory->AddPanel(_T("Selection"), m_PanelImages.ExtractIcon(13));

	pPanel->Add(new CMFCRibbonLabel(_T("Set Focus :")));
	CMFCRibbonComboBox* pSelectionCB = new CMFCRibbonComboBox(WM_ANALYSIS_TEST_SELECT, TRUE, -1,_T("Select Test"),0);
	/*
	pSelectionCB->AddItem(_T("Test1"),0);
		pSelectionCB->AddItem(_T("Test2"));
		pSelectionCB->SelectItem(0);*/
	
	pPanel->Add(pSelectionCB);

	pSelectionCB = new CMFCRibbonComboBox(WM_ANALYSIS_ITEM_SELECT, TRUE, -1,_T("Select Item"),7);
	/*
	pSelectionCB->AddItem(_T("ActivityA"),0);
		pSelectionCB->AddItem(_T("Task T1"));
		pSelectionCB->SelectItem(0);*/
	
	pPanel->Add(pSelectionCB);

	pPanel->SetJustifyColumns();

	//
	pPanel = pCategory->AddPanel(_T("Single Activity"), m_PanelImages.ExtractIcon(18));

	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEACTIVITY_TIMELINE, _T("TimeLines"), -1, 0));
	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEACTIVITY_STAGES, _T("Clustered stages"), -1, 2));
	//pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEACTIVITY_TOTALTIME, _T("Total Times"), -1, 0));
		//send to compare.
	
	pPanel->AddSeparator();
	pPanel->Add(new CMFCRibbonLabel(_T("Select Task :")));
	pSelectionCB = new CMFCRibbonComboBox(WM_ANALYSIS_SINGLEACTIVITY_CB_TASKSEL, TRUE, -1,_T("Task :"),3);
	pPanel->Add(pSelectionCB);

	CMFCRibbonButton* pBtn = new CMFCRibbonButton(WM_ANALYSIS_SINGLEACTIVITY_WITHTASK_STACKED, _T("Stacked"), 0, 1);
	pBtn->SetMenu(IDR_MENU_RIBBON_ACTIVITY1, TRUE);
	pPanel->Add(pBtn);

	pBtn = new CMFCRibbonButton(WM_ANALYSIS_SINGLEACTIVITY_WITHTASK_TOTAL, _T("Total Times"), 0, 4);
	pBtn->SetMenu(IDR_MENU_RIBBON_ACTIVITY2, TRUE);
	pPanel->Add(pBtn);

	//
	pPanel->AddSeparator();
	pPanel->Add(new CMFCRibbonLabel(_T("Select Worker :")));
	pSelectionCB = new CMFCRibbonComboBox(WM_ANALYSIS_SINGLEACTIVITY_CB_WORKERSEL, TRUE, -1,_T("Thread :"),1);
/*
	pSelectionCB->AddItem(_T("Worker T0"),0);
	pSelectionCB->AddItem(_T("Thread T1"));
	pSelectionCB->SelectItem(0);*/

	pPanel->Add(pSelectionCB);
	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEACTIVITY_WITHWORKER_TOTALTIME, _T("Time Total"), 0, 5));

	pPanel = pCategory->AddPanel(_T("All Activities"), m_PanelImages.ExtractIcon(18));

	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_ALLACTIVITIES_TOTAL, _T("Total time"), 0, 3));


	pPanel = pCategory->AddPanel(_T("Single Task"), m_PanelImages.ExtractIcon(27));

	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLETASK_RUNSHISTORY, _T("Runs History"), 0, 6));
	//pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLETASK_TOTAL, _T("Total Time"), 0, 0));
		//send to compare.

	pPanel = pCategory->AddPanel(_T("All Tasks"), m_PanelImages.ExtractIcon(19));

	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_ALLTASKS_TOTAL, _T("Total Time"), 0, 10));
			//add average time ?



	pPanel = pCategory->AddPanel(_T("Worker"), m_PanelImages.ExtractIcon(17));

	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEWORKER_RUNPAUSE, _T("Run|Pause Time"), 0, 12));
	pPanel->AddSeparator();

	pPanel->Add(new CMFCRibbonLabel(_T("Select Task :")));
	pSelectionCB = new CMFCRibbonComboBox(WM_ANALYSIS_SINGLEWORKER_CB_SELTASK, TRUE, -1,_T("Task :"),3);
	/*
	pSelectionCB->AddItem(_T("Task T0"),0);
		pSelectionCB->AddItem(_T("Task T1"));
		pSelectionCB->SelectItem(0);*/
	
	pPanel->Add(pSelectionCB);
	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEWORKER_WITHTASK_MULTIPLESTACKED, _T("Multiple Stacked"), 0, 13));
	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEWORKER_WITHTASK_TIMETOTAL, _T("Time Total"), 0, 14));

	pPanel = pCategory->AddPanel(_T("All Workers"), m_PanelImages.ExtractIcon(27));
	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_ALLWORKERS_TOTAL, _T("Total Times"), 0, 11));


	/*
pPanel = pCategory->AddPanel(_T("Tasks and activity"), m_PanelImages.ExtractIcon(27));

	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Task Stacked"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Task Pie"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Tasks Stacked"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Tasks Pie"), 0, 0));

	pPanel = pCategory->AddPanel(_T("Tasks and thread"), m_PanelImages.ExtractIcon(27));

	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Task Stacked"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Task Pie"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Tasks Stacked"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Tasks Pie"), 0, 0));

	pPanel = pCategory->AddPanel(_T("Threads and activity"), m_PanelImages.ExtractIcon(27));

	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("All Threads Column"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("all Threads Vs Activity Time two columns"), 0, 0));
*/


}
Exemple #10
0
void CMainFrame::InitializeRibbon()
{
	BOOL bNameValid;

	CString strTemp;
	bNameValid = strTemp.LoadString(IDS_RIBBON_FILE);
	ASSERT(bNameValid);

	// 창 이미지를 로드합니다.
	m_PanelImages.SetImageSize(CSize(16, 16));
	m_PanelImages.Load(IDB_BUTTONS);

	// 초기화 주 단추입니다.
	m_MainButton.SetImage(IDB_MAIN);
	m_MainButton.SetText(_T("\nf"));
	m_MainButton.SetToolTipText(strTemp);

	m_wndRibbonBar.SetApplicationButton(&m_MainButton, CSize (45, 45));
	CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory(strTemp, IDB_FILESMALL, IDB_FILELARGE);

	bNameValid = strTemp.LoadString(IDS_RIBBON_NEW);
	ASSERT(bNameValid);
	pMainPanel->Add(new CMFCRibbonButton(ID_FILE_NEW, strTemp, 0, 0));
	bNameValid = strTemp.LoadString(IDS_RIBBON_OPEN);
	ASSERT(bNameValid);
	pMainPanel->Add(new CMFCRibbonButton(ID_FILE_OPEN, strTemp, 1, 1));
	bNameValid = strTemp.LoadString(IDS_RIBBON_SAVE);
	ASSERT(bNameValid);
	pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SAVE, strTemp, 2, 2));
	bNameValid = strTemp.LoadString(IDS_RIBBON_SAVEAS);
	ASSERT(bNameValid);
	pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SAVE_AS, strTemp, 3, 3));

	bNameValid = strTemp.LoadString(IDS_RIBBON_PRINT);
	ASSERT(bNameValid);
	CMFCRibbonButton* pBtnPrint = new CMFCRibbonButton(ID_FILE_PRINT, strTemp, 6, 6);
	pBtnPrint->SetKeys(_T("p"), _T("w"));
	bNameValid = strTemp.LoadString(IDS_RIBBON_PRINT_LABEL);
	ASSERT(bNameValid);
	pBtnPrint->AddSubItem(new CMFCRibbonLabel(strTemp));
	bNameValid = strTemp.LoadString(IDS_RIBBON_PRINT_QUICK);
	ASSERT(bNameValid);
	pBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_DIRECT, strTemp, 7, 7, TRUE));
	bNameValid = strTemp.LoadString(IDS_RIBBON_PRINT_PREVIEW);
	ASSERT(bNameValid);
	pBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_PREVIEW, strTemp, 8, 8, TRUE));
	bNameValid = strTemp.LoadString(IDS_RIBBON_PRINT_SETUP);
	ASSERT(bNameValid);
	pBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_SETUP, strTemp, 11, 11, TRUE));
	pMainPanel->Add(pBtnPrint);
	pMainPanel->Add(new CMFCRibbonSeparator(TRUE));

	bNameValid = strTemp.LoadString(IDS_RIBBON_CLOSE);
	ASSERT(bNameValid);
	pMainPanel->Add(new CMFCRibbonButton(ID_FILE_CLOSE, strTemp, 9, 9));

	bNameValid = strTemp.LoadString(IDS_RIBBON_RECENT_DOCS);
	ASSERT(bNameValid);
	pMainPanel->AddRecentFilesList(strTemp);

	bNameValid = strTemp.LoadString(IDS_RIBBON_EXIT);
	ASSERT(bNameValid);
	pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_APP_EXIT, strTemp, 15));

	// "클립보드" 패널을 사용하여 "홈" 범주를 추가합니다.
	bNameValid = strTemp.LoadString(IDS_RIBBON_HOME);
	ASSERT(bNameValid);
	CMFCRibbonCategory* pCategoryHome = m_wndRibbonBar.AddCategory(strTemp, IDB_WRITESMALL, IDB_WRITELARGE);

	// "클립보드" 패널을 만듭니다.
	bNameValid = strTemp.LoadString(IDS_RIBBON_CLIPBOARD);
	ASSERT(bNameValid);
	CMFCRibbonPanel* pPanelClipboard = pCategoryHome->AddPanel(strTemp, m_PanelImages.ExtractIcon(27));

	bNameValid = strTemp.LoadString(IDS_RIBBON_PASTE);
	ASSERT(bNameValid);
	CMFCRibbonButton* pBtnPaste = new CMFCRibbonButton(ID_EDIT_PASTE, strTemp, 0, 0);
	pPanelClipboard->Add(pBtnPaste);

	bNameValid = strTemp.LoadString(IDS_RIBBON_CUT);
	ASSERT(bNameValid);
	pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_CUT, strTemp, 1));
	bNameValid = strTemp.LoadString(IDS_RIBBON_COPY);
	ASSERT(bNameValid);
	pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_COPY, strTemp, 2));
	bNameValid = strTemp.LoadString(IDS_RIBBON_SELECTALL);
	ASSERT(bNameValid);
	pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_SELECT_ALL, strTemp, -1));

	// "보기" 패널을 만들고 추가합니다.
	bNameValid = strTemp.LoadString(IDS_RIBBON_VIEW);
	ASSERT(bNameValid);
	CMFCRibbonPanel* pPanelView = pCategoryHome->AddPanel(strTemp, m_PanelImages.ExtractIcon (7));

	bNameValid = strTemp.LoadString(IDS_RIBBON_STATUSBAR);
	ASSERT(bNameValid);
	CMFCRibbonButton* pBtnStatusBar = new CMFCRibbonCheckBox(ID_VIEW_STATUS_BAR, strTemp);
	pPanelView->Add(pBtnStatusBar);

	// 탭의 오른쪽에 요소를 추가합니다.
	bNameValid = strTemp.LoadString(IDS_RIBBON_STYLE);
	ASSERT(bNameValid);
	CMFCRibbonButton* pVisualStyleButton = new CMFCRibbonButton(-1, strTemp, -1, -1);

	pVisualStyleButton->SetMenu(IDR_THEME_MENU, FALSE /* 기본값 없음 명령입니다. */, TRUE /* 오른쪽 맞춤입니다. */);

	bNameValid = strTemp.LoadString(IDS_RIBBON_STYLE_TIP);
	ASSERT(bNameValid);
	pVisualStyleButton->SetToolTipText(strTemp);
	bNameValid = strTemp.LoadString(IDS_RIBBON_STYLE_DESC);
	ASSERT(bNameValid);
	pVisualStyleButton->SetDescription(strTemp);
	m_wndRibbonBar.AddToTabs(pVisualStyleButton);

	// 빠른 실행 도구 모음 명령을 추가합니다.
	CList<UINT, UINT> lstQATCmds;

	lstQATCmds.AddTail(ID_FILE_NEW);
	lstQATCmds.AddTail(ID_FILE_OPEN);
	lstQATCmds.AddTail(ID_FILE_SAVE);
	lstQATCmds.AddTail(ID_FILE_PRINT_DIRECT);

	m_wndRibbonBar.SetQuickAccessCommands(lstQATCmds);

	m_wndRibbonBar.AddToTabs(new CMFCRibbonButton(ID_APP_ABOUT, _T("\na"), m_PanelImages.ExtractIcon (0)));
}
Exemple #11
0
void CTinyCADMainFrame::InitializeRibbon()
{
	BOOL bNameValid;

	CString strTemp;
	bNameValid = strTemp.LoadString(IDS_RIBBON_FILE);
	ASSERT(bNameValid);

	// 加载面板图像:
	m_PanelImages.SetImageSize(CSize(16, 16));
	m_PanelImages.Load(IDB_BUTTONS);

	// 初始主按钮:
	m_MainButton.SetImage(IDB_MAIN);
	m_MainButton.SetText(_T("\nf"));
	m_MainButton.SetToolTipText(strTemp);

	m_wndRibbonBar.SetApplicationButton(&m_MainButton, CSize (45, 45));
	CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory(strTemp, IDB_FILESMALL, IDB_FILELARGE);

	bNameValid = strTemp.LoadString(IDS_RIBBON_NEW);
	ASSERT(bNameValid);
	pMainPanel->Add(new CMFCRibbonButton(ID_FILE_NEW, strTemp, 0, 0));
	bNameValid = strTemp.LoadString(IDS_RIBBON_OPEN);
	ASSERT(bNameValid);
	pMainPanel->Add(new CMFCRibbonButton(ID_FILE_OPEN, strTemp, 1, 1));
	bNameValid = strTemp.LoadString(IDS_RIBBON_SAVE);
	ASSERT(bNameValid);
	pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SAVE, strTemp, 2, 2));
	bNameValid = strTemp.LoadString(IDS_RIBBON_SAVEAS);
	ASSERT(bNameValid);
	pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SAVE_AS, strTemp, 3, 3));

	bNameValid = strTemp.LoadString(IDS_RIBBON_PRINT);
	ASSERT(bNameValid);
	CMFCRibbonButton* pBtnPrint = new CMFCRibbonButton(ID_FILE_PRINT, strTemp, 6, 6);
	pBtnPrint->SetKeys(_T("p"), _T("w"));
	bNameValid = strTemp.LoadString(IDS_RIBBON_PRINT_LABEL);
	ASSERT(bNameValid);
	pBtnPrint->AddSubItem(new CMFCRibbonLabel(strTemp));
	bNameValid = strTemp.LoadString(IDS_RIBBON_PRINT_QUICK);
	ASSERT(bNameValid);
	pBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_DIRECT, strTemp, 7, 7, TRUE));
	bNameValid = strTemp.LoadString(IDS_RIBBON_PRINT_PREVIEW);
	ASSERT(bNameValid);
	pBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_PREVIEW, strTemp, 8, 8, TRUE));
	bNameValid = strTemp.LoadString(IDS_RIBBON_PRINT_SETUP);
	ASSERT(bNameValid);
	pBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_SETUP, strTemp, 11, 11, TRUE));
	pMainPanel->Add(pBtnPrint);
	pMainPanel->Add(new CMFCRibbonSeparator(TRUE));

	bNameValid = strTemp.LoadString(IDS_RIBBON_CLOSE);
	ASSERT(bNameValid);
	pMainPanel->Add(new CMFCRibbonButton(ID_FILE_CLOSE, strTemp, 9, 9));

	bNameValid = strTemp.LoadString(IDS_RIBBON_RECENT_DOCS);
	ASSERT(bNameValid);
	pMainPanel->AddRecentFilesList(strTemp);

	bNameValid = strTemp.LoadString(IDS_RIBBON_EXIT);
	ASSERT(bNameValid);
	pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_APP_EXIT, strTemp, 15));

	// 为“剪贴板”面板添加“主”类别:
	bNameValid = strTemp.LoadString(IDS_RIBBON_HOME);
	ASSERT(bNameValid);
	CMFCRibbonCategory* pCategoryHome = m_wndRibbonBar.AddCategory(strTemp, IDB_WRITESMALL, IDB_WRITELARGE);

	// 创建“剪贴板”面板:
	bNameValid = strTemp.LoadString(IDS_RIBBON_CLIPBOARD);
	ASSERT(bNameValid);
	CMFCRibbonPanel* pPanelClipboard = pCategoryHome->AddPanel(strTemp, m_PanelImages.ExtractIcon(27));

	bNameValid = strTemp.LoadString(IDS_RIBBON_PASTE);
	ASSERT(bNameValid);
	CMFCRibbonButton* pBtnPaste = new CMFCRibbonButton(ID_EDIT_PASTE, strTemp, 0, 0);
	pPanelClipboard->Add(pBtnPaste);

	bNameValid = strTemp.LoadString(IDS_RIBBON_CUT);
	ASSERT(bNameValid);
	pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_CUT, strTemp, 1));
	bNameValid = strTemp.LoadString(IDS_RIBBON_COPY);
	ASSERT(bNameValid);
	pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_COPY, strTemp, 2));
	bNameValid = strTemp.LoadString(IDS_RIBBON_SELECTALL);
	ASSERT(bNameValid);
	pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_SELECT_ALL, strTemp, -1));

	bNameValid = strTemp.LoadString(IDS_RIBBON_INSERT_OBJECT);
	ASSERT(bNameValid);
	pPanelClipboard->Add(new CMFCRibbonButton(ID_OLE_INSERT_NEW, strTemp, -1));

	// 创建和添加“视图”面板:
	bNameValid = strTemp.LoadString(IDS_RIBBON_VIEW);
	ASSERT(bNameValid);
	CMFCRibbonPanel* pPanelView = pCategoryHome->AddPanel(strTemp, m_PanelImages.ExtractIcon (7));

	bNameValid = strTemp.LoadString(IDS_RIBBON_STATUSBAR);
	ASSERT(bNameValid);
	CMFCRibbonButton* pBtnStatusBar = new CMFCRibbonCheckBox(ID_VIEW_STATUS_BAR, strTemp);
	pPanelView->Add(pBtnStatusBar);

	// 创建和添加“窗口”面板:
	bNameValid = strTemp.LoadString(IDS_RIBBON_WINDOW);
	ASSERT(bNameValid);
	CMFCRibbonPanel* pPanelWindow = pCategoryHome->AddPanel(strTemp, m_PanelImages.ExtractIcon (7));

	bNameValid = strTemp.LoadString(IDS_RIBBON_WINDOWS);
	ASSERT(bNameValid);
	CMFCRibbonButton* pBtnWindows = new CMFCRibbonButton(ID_WINDOW_MANAGER, strTemp, -1, 1);
	pBtnWindows->SetMenu(IDR_WINDOWS_MENU, TRUE);
	pPanelWindow->Add(pBtnWindows);

	// 将元素添加到选项卡右侧:
	bNameValid = strTemp.LoadString(IDS_RIBBON_STYLE);
	ASSERT(bNameValid);
	CMFCRibbonButton* pVisualStyleButton = new CMFCRibbonButton(-1, strTemp, -1, -1);

	pVisualStyleButton->SetMenu(IDR_THEME_MENU, FALSE /* 无默认命令*/, TRUE /* 右对齐*/);

	bNameValid = strTemp.LoadString(IDS_RIBBON_STYLE_TIP);
	ASSERT(bNameValid);
	pVisualStyleButton->SetToolTipText(strTemp);
	bNameValid = strTemp.LoadString(IDS_RIBBON_STYLE_DESC);
	ASSERT(bNameValid);
	pVisualStyleButton->SetDescription(strTemp);
	m_wndRibbonBar.AddToTabs(pVisualStyleButton);

	// 添加快速访问工具栏命令:
	CList<UINT, UINT> lstQATCmds;

	lstQATCmds.AddTail(ID_FILE_NEW);
	lstQATCmds.AddTail(ID_FILE_OPEN);
	lstQATCmds.AddTail(ID_FILE_SAVE);
	lstQATCmds.AddTail(ID_FILE_PRINT_DIRECT);

	m_wndRibbonBar.SetQuickAccessCommands(lstQATCmds);

	CMFCRibbonButton* pHelpButton = new CMFCRibbonButton(ID_HELP_FINDER, _T("\na"), m_PanelImages.ExtractIcon (0));
	pHelpButton->SetMenu(IDR_HELP_MENU, ID_HELP_FINDER, TRUE /* 右对齐*/);
	m_wndRibbonBar.AddToTabs(pHelpButton);
}
Exemple #12
0
void CMainFrame::InitializeRibbon()
{
	BOOL bNameValid;

	CString strTemp;

	// 加载面板图像:
	m_PanelImages.SetImageSize(CSize(16, 16));
	m_PanelImages.Load(IDB_BUTTONS);

	// 初始主按钮:
	strTemp="系统";
	m_MainButton.SetImage(IDB_MAIN);
	m_MainButton.SetText(_T("\nf"));
	m_MainButton.SetToolTipText(strTemp);

	m_wndRibbonBar.SetApplicationButton(&m_MainButton, CSize (45, 45));
	CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory(strTemp, IDB_SYSTEMSMALL, IDB_SYSTEMLARGE);

	//bNameValid = strTemp.LoadString(IDS_RIBBON_FIND_CAMERA);
	//ASSERT(bNameValid);
	//pMainPanel->Add(new CMFCRibbonButton(ID_FIND_CAMERA, strTemp, 0, 0));
	//pMainPanel->Add(new CMFCRibbonSeparator(TRUE));

	bNameValid = strTemp.LoadString(IDS_RIBBON_EXIT);
	ASSERT(bNameValid);
	pMainPanel->Add(new CMFCRibbonButton(ID_APP_EXIT, strTemp, 0, 0)); //CMFCRibbonMainPanelButton(ID_APP_EXIT, strTemp,1,1));


	strTemp = "系统";//Page1
	CMFCRibbonCategory* pCategoryHome = m_wndRibbonBar.AddCategory(strTemp, IDB_MONITOR_SMALL, IDB_MONITOR_LARGE);

	strTemp = "监控窗口"; //page1->pan1
	CMFCRibbonPanel* pPanelVV = pCategoryHome->AddPanel(strTemp, m_PanelImages.ExtractIcon(27));
	pPanelVV->SetJustifyColumns();

	strTemp = "单窗";	 //page1-Pan1-btn
	CMFCRibbonButton* pBtnVV1 = new CMFCRibbonButton(ID_VV1, strTemp, 0, 0);
	pPanelVV->Add(pBtnVV1);

	strTemp = "4窗";//page1-Pan1-btn
	CMFCRibbonButton* pBtnVV4 = new CMFCRibbonButton(ID_VV4, strTemp, 1);
	pPanelVV->Add(pBtnVV4);
	strTemp = "6窗";//page1-Pan1-btn
	CMFCRibbonButton* pBtnVV6 = new CMFCRibbonButton(ID_VV6, strTemp, 2);
	pPanelVV->Add(pBtnVV6);
	strTemp = "8窗";
	CMFCRibbonButton* pBtnVV8 = new CMFCRibbonButton(ID_VV8, strTemp, 3);
	pPanelVV->Add(pBtnVV8);
	strTemp = "9窗";
	CMFCRibbonButton* pBtnVV9 = new CMFCRibbonButton(ID_VV9, strTemp, 4);
	pPanelVV->Add(pBtnVV9);

	strTemp = "16窗";
	CMFCRibbonButton* pBtnVV16 = new CMFCRibbonButton(ID_VV16, strTemp, 5);
	pPanelVV->Add(pBtnVV16);
	strTemp = "25窗";
	CMFCRibbonButton* pBtnVV25 = new CMFCRibbonButton(ID_VV25, strTemp, 6);
	pPanelVV->Add(pBtnVV25);

	//bNameValid = strTemp.LoadString(IDS_RIBBON_SELECTALL);
	//ASSERT(bNameValid);
	//pPanelVV->Add(new CMFCRibbonButton(ID_EDIT_SELECT_ALL, strTemp, -1));

	// 创建和添加“视图”面板: ////page1-Pan2-btn
	bNameValid = strTemp.LoadString(IDS_RIBBON_VIEW);
	ASSERT(bNameValid);
	CMFCRibbonPanel* pPanelView = pCategoryHome->AddPanel(strTemp, m_PanelImages.ExtractIcon (7));

	bNameValid = strTemp.LoadString(IDS_RIBBON_STATUSBAR);
	ASSERT(bNameValid);
	CMFCRibbonButton* pBtnStatusBar = new CMFCRibbonCheckBox(ID_VIEW_STATUS_BAR, strTemp);
	pPanelView->Add(pBtnStatusBar);


	// 创建和添加“系统配置”面板: ////page1-Pan3-btn
	strTemp = "配置与管理";
	CMFCRibbonPanel* pPanelCfgAndMgr = pCategoryHome->AddPanel(strTemp);
	
	strTemp = "配置";
	CMFCRibbonButton* pBtnSysCfg = new CMFCRibbonButton(ID_SYSTEM_CONFIG, strTemp,-1,1);
	pPanelCfgAndMgr->Add(pBtnSysCfg);

	// 创建和添加“任务管理”面板: ////page1-Pan4-btn
	strTemp = "任务";
	//CMFCRibbonPanel* pPanelTaskMgr = pCategoryHome->AddPanel(strTemp);
	//strTemp = "";
	CMFCRibbonButton* pBtnTaskMgr = new CMFCRibbonButton(ID_TASK_MGR, strTemp,-1,2);
	pPanelCfgAndMgr->Add(pBtnTaskMgr);


	// 创建和添加“告警管理”面板: ////page1-Pan5-btn
	strTemp = "告警";
	//CMFCRibbonPanel* pPanelAlertMgr = pCategoryHome->AddPanel(strTemp);
	//strTemp = "";
	CMFCRibbonButton* pBtnAlertCfg = new CMFCRibbonButton(ID_WARNING_MGR, strTemp,-1,3);
	pPanelCfgAndMgr->Add(pBtnAlertCfg);

	// 创建和添加“用户管理”面板: ////page1-Pan5-btn
	strTemp = "用户";
	//CMFCRibbonPanel* pPanelUserMgr = pCategoryHome->AddPanel(strTemp);
	//strTemp = "";
	CMFCRibbonButton* pBtnUser = new CMFCRibbonButton(ID_USER_MGR, strTemp,-1,4);
	pPanelCfgAndMgr->Add(pBtnUser);


	// 将元素添加到选项卡右侧:
	bNameValid = strTemp.LoadString(IDS_RIBBON_STYLE);
	ASSERT(bNameValid);
	CMFCRibbonButton* pVisualStyleButton = new CMFCRibbonButton(-1, strTemp, -1, -1);

	pVisualStyleButton->SetMenu(IDR_THEME_MENU, FALSE /* 无默认命令*/, TRUE /* 右对齐*/);

	bNameValid = strTemp.LoadString(IDS_RIBBON_STYLE_TIP);
	ASSERT(bNameValid);
	pVisualStyleButton->SetToolTipText(strTemp);
	bNameValid = strTemp.LoadString(IDS_RIBBON_STYLE_DESC);
	ASSERT(bNameValid);
	pVisualStyleButton->SetDescription(strTemp);
	m_wndRibbonBar.AddToTabs(pVisualStyleButton);

	// 添加快速访问工具栏命令:
	CList<UINT, UINT> lstQATCmds;

	//lstQATCmds.AddTail(ID_FIND_CAMERA);

	m_wndRibbonBar.SetQuickAccessCommands(lstQATCmds);

	m_wndRibbonBar.AddToTabs(new CMFCRibbonButton(ID_APP_ABOUT, _T("\na"), m_PanelImages.ExtractIcon (0)));
}
Exemple #13
0
void CMainFrame::Add_Category3()
{
	CreateDocumentColors();

	CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Color Buttons"), IDB_RIBBON_CATEGORY3_SMALL, IDB_RIBBON_CATEGORY3_LARGE);

	CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Large"));

	CMFCRibbonColorButton* pBtn1 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_1, _T("Simple"), TRUE, 0, 0);
	pBtn1->SetAlwaysLargeImage();
	pBtn1->SetDefaultCommand(FALSE);
	pPanel1->Add(pBtn1);

	CMFCRibbonColorButton* pBtn2 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_2, _T("Simple with Options"), TRUE, 1, 1);
	pBtn2->SetAlwaysLargeImage();
	pBtn2->SetDefaultCommand(FALSE);
	pBtn2->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
	pBtn2->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
	pPanel1->Add(pBtn2);

	CMFCRibbonColorButton* pBtn3 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_3, _T("Custom"), TRUE, 2, 2);
	pBtn3->SetAlwaysLargeImage();
	pBtn3->SetDefaultCommand(FALSE);
	pBtn3->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
	pBtn3->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
	pBtn3->SetColumns(10);
	pBtn3->SetColorBoxSize(CSize(17, 17));
	pBtn3->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
	pBtn3->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
	pBtn3->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
	pPanel1->Add(pBtn3);

	CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Small"));

	CMFCRibbonColorButton* pBtn4 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_4, _T("Simple"), TRUE, 3, -1);
	pBtn4->SetDefaultCommand(FALSE);
	pPanel2->Add(pBtn4);

	CMFCRibbonColorButton* pBtn5 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_5, _T("Simple with Options"), TRUE, 4, -1);
	pBtn5->SetDefaultCommand(FALSE);
	pBtn5->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
	pBtn5->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
	pPanel2->Add(pBtn5);

	CMFCRibbonColorButton* pBtn6 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_6, _T("Custom"), TRUE, 5, -1);
	pBtn6->SetDefaultCommand(FALSE);
	pBtn6->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
	pBtn6->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
	pBtn6->SetColumns(10);
	pBtn6->SetColorBoxSize(CSize(17, 17));
	pBtn6->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
	pBtn6->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
	pBtn6->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
	pPanel2->Add(pBtn6);

	CMFCRibbonPanel* pPanel3 = pCategory->AddPanel(_T("Small with Indicator"));

	CMFCRibbonColorButton* pBtn7 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_7, _T("Simple"), 6);
	pBtn7->SetColor(RGB(255, 0, 0));
	pPanel3->Add(pBtn7);

	CMFCRibbonColorButton* pBtn8 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_8, _T("Simple with Options"), 7);
	pBtn8->SetColor(RGB(0, 0, 255));
	pBtn8->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
	pBtn8->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
	pPanel3->Add(pBtn8);

	CMFCRibbonColorButton* pBtn9 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_9, _T("Custom"), 8);
	pBtn9->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
	pBtn9->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
	pBtn9->SetColumns(10);
	pBtn9->SetColorBoxSize(CSize(17, 17));
	pBtn9->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
	pBtn9->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
	pBtn9->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
	pPanel3->Add(pBtn9);

	CMFCRibbonPanel* pPanel4 = pCategory->AddPanel(_T("Embedded"));

	CMFCRibbonColorButton* pBtn10 = new CMFCRibbonColorButton(ID_RIBBON_CBTN_10, _T("Embedded"), TRUE, 1, 1);
	pBtn10->EnableOtherButton(_T("&More Colors..."), _T("More Shading Colors"));
	pBtn10->SetColor(RGB(240, 240, 240));
	pBtn10->SetColumns(10);
	pBtn10->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
	pBtn10->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
	pBtn10->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
	pBtn10->SetColorBoxSize(CSize(17, 17));
	pBtn10->SetButtonMode(FALSE);
	pBtn10->EnableAutomaticButton(_T("&No Color"), (COLORREF)-1, TRUE, NULL, FALSE /* Bottom */);
	pPanel4->Add(pBtn10);

	pPanel1->SetData(ID_RIBBON_SOURCE_CODE_3_1);
	pPanel2->SetData(ID_RIBBON_SOURCE_CODE_3_2);
	pPanel3->SetData(ID_RIBBON_SOURCE_CODE_3_3);
	pPanel4->SetData(ID_RIBBON_SOURCE_CODE_3_4);
}
Exemple #14
0
void CMainFrame::AddContextTab_Format()
{
	CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddContextCategory(_T("Format"), _T("Drawing tools"), ID_FORMAT_CONTEXT_TAB, AFX_CategoryColor_Orange, IDB_RIBBON_FORMATSMALL, IDB_RIBBON_FORMATLARGE);
	pCategory->SetKeys(_T("jd"));

	// Create "Styles" panel
	CMFCRibbonPanel* pPanelStyles = pCategory->AddPanel(_T("Styles\nzs"), m_PanelImages.ExtractIcon(8));

	// <snippet6>
	CMFCRibbonGallery* pBtnStyles = new CMFCRibbonGallery(ID_OBJECT_STYLES, _T("Styles\nk"), 0, 0, IDB_STYLES, 40);
	pBtnStyles->SetIconsInRow(7);
	pBtnStyles->EnableMenuResize(TRUE, TRUE);
	pBtnStyles->EnableMenuSideBar();
	pBtnStyles->SetButtonMode(false);
	pBtnStyles->RedrawIcons();
	// </snippet6>

	pPanelStyles->Add(pBtnStyles);

	CMFCRibbonColorButton* pBtnFillColor = new CMFCRibbonColorButton(ID_OBJECT_FILLCOLOR, _T("Fill Color\nsf"), FALSE, 1, -1);
	pBtnFillColor->SetDefaultCommand(FALSE);
	pBtnFillColor->EnableAutomaticButton(_T("&Automatic"), RGB(128, 128, 128));
	pBtnFillColor->EnableOtherButton(_T("&More Fill Colors..."), _T("More Fill Colors"));
	pBtnFillColor->SetColumns(10);
	pBtnFillColor->SetColorBoxSize(CSize(17, 17));
	pBtnFillColor->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
	pBtnFillColor->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
	pBtnFillColor->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
	pBtnFillColor->AddSubItem(new CMFCRibbonButton(ID_OBJECT_NOFILL, _T("&No Fill\nn"), 2));
	pBtnFillColor->SetColor((COLORREF)-1);
	pPanelStyles->Add(pBtnFillColor);

	CMFCRibbonColorButton* pBtnLineColor = new CMFCRibbonColorButton(ID_OBJECT_LINECOLOR, _T("Line Color\nso"), FALSE, 3, -1);
	pBtnLineColor->SetDefaultCommand(FALSE);
	pBtnLineColor->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
	pBtnLineColor->EnableOtherButton(_T("&More Line Colors..."), _T("More Line Colors"));
	pBtnLineColor->SetColumns(10);
	pBtnLineColor->SetColorBoxSize(CSize(17, 17));
	pBtnLineColor->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
	pBtnLineColor->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
	pBtnLineColor->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
	pBtnLineColor->AddSubItem(new CMFCRibbonButton(ID_OBJECT_NOLINE, _T("&No Line\nn"), 2));
	pBtnLineColor->SetColor((COLORREF)-1);
	pPanelStyles->Add(pBtnLineColor);

	CStringArray sa;
	sa.Add(_T("1 pt"));
	sa.Add(_T("2 pt"));
	sa.Add(_T("3 pt"));
	sa.Add(_T("4 pt"));
	sa.Add(_T("5 pt"));
	sa.Add(_T("6 pt"));
	sa.Add(_T("7 pt"));
	CRibbonListButton* pBtnLineWeight = new CRibbonListButton(ID_OBJECT_LINEWEIGHT, _T("Line Weight\nsw"), 4, -1, IDB_LINEWEIGHT, 96, sa);
	pBtnLineWeight->AddSubItem(new CMFCRibbonButton(ID_OBJECT_LINEWEIGHT_MORE, _T("More &Lines..."), 5, -1));
	pBtnLineWeight->EnableMenuResize(TRUE, TRUE); // Vertical only
	pPanelStyles->Add(pBtnLineWeight);

	// Create "Arrange" panel
	CMFCRibbonPanel* pPanelArrange = pCategory->AddPanel(_T("Arrange\nzj"), m_PanelImages.ExtractIcon(3));

	pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVETOFRONT, _T("Move to Front\nmf"), 7, 1));
	pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVEFORWARD, _T("Move Forward\nmw"), 9, 3));
	pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVEBACK, _T("Move Backward\nmd"), 10, 4));
	pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVETOBACK, _T("Move to Back\nmb"), 8, 2));
}
Exemple #15
0
void CMainFrame::InitHomeCategory()
{
	CreateDocumentColors();

	CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Home"), IDB_RIBBON_HOMESMALL, IDB_RIBBON_HOMELARGE);

	// Create "Clipboard" panel:
	CMFCRibbonPanel* pPanelClipboard = pCategory->AddPanel(_T("Clipboard\nzc"), m_PanelImages.ExtractIcon(0));

	CMFCRibbonButton* pBtnPaste = new CMFCRibbonButton(ID_EDIT_PASTE, _T("Paste\nv"), 0, 0);
	pPanelClipboard->Add(pBtnPaste);

	pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_CUT, _T("Cut\nx"), 1));
	pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_COPY, _T("Copy\nc"), 2));
	pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_CLEAR, _T("Delete\nt"), 3));

	// Create "Operations" panel
	CMFCRibbonPanel* pPanelOperations = pCategory->AddPanel(_T("Operations\nzo"), m_PanelImages.ExtractIcon(1));

	// <Snippet3>
	// Create the "Paper Color" button
	CMFCRibbonColorButton* pBtnPaperColor = new CMFCRibbonColorButton(ID_VIEW_PAPERCOLOR, _T("Paper Color\ng"), TRUE, 13, 1);
	pBtnPaperColor->SetAlwaysLargeImage();
	pBtnPaperColor->EnableAutomaticButton(_T("&Automatic"), RGB(255, 255, 255));
	pBtnPaperColor->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
	pBtnPaperColor->SetColumns(10);
	pBtnPaperColor->SetColorBoxSize(CSize(17, 17));
	// CList<COLORREF,COLORREF> m_lstMainColors
	pBtnPaperColor->AddColorsGroup(_T("Theme Colors"), m_lstMainColors, TRUE);
	// CList<COLORREF,COLORREF> m_lstAdditionalColors
	pBtnPaperColor->AddColorsGroup(_T(""), m_lstAdditionalColors, FALSE);
	// CList<COLORREF,COLORREF> m_lstStandardColors
	pBtnPaperColor->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors, TRUE);
	CList<COLORREF,COLORREF> lstColors;
	lstColors.AddTail(RGB(255,0,0));
	lstColors.AddTail(RGB(0,255,0));
	lstColors.AddTail(RGB(0,0,255));
	pBtnPaperColor->SetDocumentColors( _T("Document Colors"), lstColors );
    // </Snippet3>

	pPanelOperations->Add(pBtnPaperColor);

	pPanelOperations->Add(new CMFCRibbonButton(ID_EDIT_SELECT_ALL, _T("Select All\na"), 4));
	pPanelOperations->Add(new CMFCRibbonButton(ID_OLE_INSERT_NEW, _T("New Object...\no"), 5));
	pPanelOperations->Add(new CMFCRibbonButton(ID_OLE_EDIT_LINKS, _T("Links...\ni"), 6));

	// Create "Draw" panel
	CMFCRibbonPanel* pPanelDraw = pCategory->AddPanel(_T("Draw\nzd"), m_PanelImages.ExtractIcon(2));

	pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_SELECT, _T("Select\ns"), 7));
	pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_LINE, _T("Line\nl"), 8));
	pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_RECT, _T("Rectangle\nr"), 9));
	pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_ROUNDRECT, _T("Round Rectangle\nn"), 10));
	pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_ELLIPSE, _T("Ellipse\ne"), 11));
	pPanelDraw->Add(new CMFCRibbonButton(ID_DRAW_POLYGON, _T("Polygon\ny"), 12));

	// Create "Arrange" panel
	CMFCRibbonPanel* pPanelArrange = pCategory->AddPanel(_T("Arrange\nzj"), m_PanelImages.ExtractIcon(3));

	pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVETOFRONT, _T("Move to Front\nmf"), 15, 3));
	pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVEFORWARD, _T("Move Forward\nmw"), 17, 5));
	pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVEBACK, _T("Move Backward\nmd"), 18, 6));
	pPanelArrange->Add(new CMFCRibbonButton(ID_OBJECT_MOVETOBACK, _T("Move to Back\nmb"), 16, 4));

	// Add not-in-ribbon commands
	CMFCRibbonButton* pUndo = new CMFCRibbonButton(ID_EDIT_UNDO, _T("Undo"), 20);
	pCategory->AddHidden(pUndo);
}
void CMyRibbonBar::addChartTools()
{

	CMFCRibbonButton* pBtn=NULL;

	//
	CMFCRibbonCategory* pCategory = AddContextCategory(_T("Design"), _T("Chart tools"), IDB_CHART, AFX_CategoryColor_Green, IDB_CHART_DESIGN16, IDB_CHART_MENU);
	pCategory->SetKeys(_T("jc"));



	CMFCRibbonPanel* pPanel = pCategory->AddPanel(_T("Chart type"), m_PanelImages.ExtractIcon(20));


	pPanel->Add(new CMFCRibbonButton(WM_CHART_DESIGN_TYPE_COLUMN, _T("Column\nc"), -1, 0));
	pPanel->Add(new CMFCRibbonButton(WM_CHART_DESIGN_TYPE_LINE, _T("Line\nc"), -1, 1));
	pPanel->Add(new CMFCRibbonButton(WM_CHART_DESIGN_TYPE_PIE, _T("Pie\nc"), -1, 2));
	pPanel->Add(new CMFCRibbonButton(WM_CHART_DESIGN_TYPE_HCOLUMN, _T("Horizontal\nc"), -1, 3));
	pPanel->Add(new CMFCRibbonButton(WM_CHART_DESIGN_TYPE_AREA, _T("Area\nc"), -1, 4));
	pPanel->Add(new CMFCRibbonButton(WM_CHART_DESIGN_TYPE_SNOW, _T("Snow\nc"), -1, 5));
	pPanel->Add(new CMFCRibbonButton(WM_CHART_DESIGN_TYPE_DOUGHNUT, _T("Doughnut\nc"), -1, 6));

	pPanel = pCategory->AddPanel(_T("Design"), m_PanelImages.ExtractIcon(20));

	pBtn=new CMFCRibbonButton(WM_CHART_DESIGN_PALETTE, _T("Palette\nc"), -1, 7);
	pBtn->SetMenu(IDR_CHART_PALETTE,FALSE);
	pPanel->Add (pBtn);



	pPanel = pCategory->AddPanel(_T("3D"), m_PanelImages.ExtractIcon(20));
	pPanel->Add(new CMFCRibbonButton(WM_CHART_DESIGN_ENABLE3D , _T("3D Chart\nc"), -1, 8));

	pPanel->AddSeparator();
	CMFCRibbonEdit* pEditBtn = new CMFCRibbonEdit(WM_CHART_DESIGN_WALL_WIDTH , 50, _T("Wall width:"), 7);
	pEditBtn->EnableSpinButtons(0, 99);
	pEditBtn->SetEditText(_T("0"));
	pPanel->Add(pEditBtn);


	pEditBtn = new CMFCRibbonEdit(WM_CHART_DESIGN_POINT_DEPTH , 50, _T("Point depth:"), 6);
	pEditBtn->EnableSpinButtons(0, 99);
	pEditBtn->SetEditText(_T("0"));
	pPanel->Add(pEditBtn);

	pEditBtn = new CMFCRibbonEdit(WM_CHART_DESIGN_GAP_DEPTH , 50, _T("Gap depth:"), 5);
	pEditBtn->EnableSpinButtons(0, 99);
	pEditBtn->SetEditText(_T("0"));
	pPanel->Add(pEditBtn);

	pPanel->AddSeparator();

	pEditBtn = new CMFCRibbonEdit(WM_CHART_DESIGN_PERSPECTIVE, 50, _T("Perspective:"), 4);
	pEditBtn->EnableSpinButtons(0, 99);
	pEditBtn->SetEditText(_T("0"));
	pPanel->Add(pEditBtn);


	pEditBtn = new CMFCRibbonEdit(WM_CHART_DESIGN_ROTATEX, 50, _T("Rotate X:"), 0);
	pEditBtn->EnableSpinButtons(0, 99);
	pEditBtn->SetEditText(_T("0"));
	pPanel->Add(pEditBtn);

	pEditBtn = new CMFCRibbonEdit(WM_CHART_DESIGN_ROTATEY, 50, _T("Rotate Y:"), 1);
	pEditBtn->EnableSpinButtons(0, 99);
	pEditBtn->SetEditText(_T("0"));
	pPanel->Add(pEditBtn);

	pPanel->SetJustifyColumns();
	//
	pPanel = pCategory->AddPanel(_T("Antiliasing"), m_PanelImages.ExtractIcon(20));
	pPanel->Add(new CMFCRibbonButton(WM_CHART_DESIGN_GRAPHICS_ANTILIASING, _T("Graphic antiliasing\nc"), -1, 0));
	pPanel->Add(new CMFCRibbonButton(WM_CHART_DESIGN_TEXT_ANTILIASING, _T("Text antiliasing\nc"), -1, 9));


	CMFCRibbonCategory* pCategory2 = AddContextCategory(_T("Layout"), _T("Chart tools"), IDB_CHART, AFX_CategoryColor_Green, IDB_CHART_LAYOUT, IDB_CHART_LAYOUTLARGE);
	pCategory2->SetKeys(_T("ja"));


	CMFCRibbonPanel* pPanelLayout_Labels = pCategory2->AddPanel(_T("Labels"), m_PanelImages.ExtractIcon(20));

	pBtn=new CMFCRibbonButton (WM_CHART_LAYOUT_TITLE, _T("Chart Title\nt"),-1, 3);
	pBtn->SetMenu(IDR_CHARTTITLE,FALSE);
	pPanelLayout_Labels->Add (pBtn);

	/*
	pBtn=new CMFCRibbonButton(WM_CHART_LAYOUT_AXIS_TITLES, _T("Axis Titles\ni"), -1, 4);
		pBtn->SetMenu(IDR_AXISTITLES,FALSE);
		pPanelLayout_Labels->Add (pBtn);*/
	

	pPanelLayout_Labels->Add(new CMFCRibbonButton(WM_CHART_LAYOUT_LEGEND, _T("Legend\nl"), 3, 5));
	pPanelLayout_Labels->Add(new CMFCRibbonButton(WM_CHART_LAYOUT_POINTS_LABELS, _T("Data Labels\nb"), 4, 6));

	CMFCRibbonPanel* pPanelLayout_Axes = pCategory2->AddPanel(_T("Axes"), m_PanelImages.ExtractIcon(20));


	pBtn=new CMFCRibbonButton(WM_CHART_LAYOUT_AXIS, _T("Axes\na"), -1, 8);
	pBtn->SetMenu(IDR_AXIS,FALSE);
	pPanelLayout_Axes->Add (pBtn);


	pPanelLayout_Axes->Add(new CMFCRibbonButton(WM_CHART_LAYOUT_GRID, _T("Gridlines\ng"), -1, 9));

	CMFCRibbonCategory* pCategory3 = AddContextCategory(_T("Format"), _T("Chart tools"), IDB_CHART, AFX_CategoryColor_Green, IDB_CHART_FORMAT, IDB_CHART_MENU);
	pCategory3->SetKeys(_T("jo"));

	CMFCRibbonPanel* pPanelFormat_Sel = pCategory3->AddPanel(_T("Current Selection"), m_PanelImages.ExtractIcon(13));

	CMFCRibbonComboBox* pFormatSelCombo = new CMFCRibbonComboBox(WM_CHART_FORMAT_SEL_COMBO, TRUE, -1,_T("Select Item"),0);
	pFormatSelCombo->AddItem(_T("Chart Title"),0);
	pFormatSelCombo->AddItem(_T("Chart Area"));
	pFormatSelCombo->AddItem(_T("Legend"));
	pFormatSelCombo->AddItem(_T("x Axis Title"));
	pFormatSelCombo->AddItem(_T("y Axis Title"));
//	pFormatSelCombo->AddItem(_T("Series \"Series1\""),1);
	pFormatSelCombo->SelectItem(0);
	pPanelFormat_Sel->Add(pFormatSelCombo);

	pPanelFormat_Sel->Add(new CMFCRibbonLabel(_T("Change text :")));
	CMFCRibbonEdit* pBtn1 = new CMFCRibbonEdit(WM_CHART_FORMAT_TEXT , 200);
	pBtn1->SetEditText(_T("Edit"));
	pPanelFormat_Sel->Add(pBtn1);

	pPanel = pCategory3->AddPanel(_T("Shape Fill"), m_PanelImages.ExtractIcon(5));

	CMFCRibbonColorButton* pColorBtn = new CMFCRibbonColorButton(WM_CHART_FORMAT_FILL_COLOR1 , _T("Primary color"), 2);
	pColorBtn->SetDefaultCommand(FALSE);
	pColorBtn->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
	pColorBtn->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
	pColorBtn->SetColumns(10);
	pColorBtn->SetColorBoxSize(CSize(17, 17));
	pColorBtn->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
	pColorBtn->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
	pColorBtn->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
	pPanel->Add(pColorBtn);

	pColorBtn = new CMFCRibbonColorButton(WM_CHART_FORMAT_FILL_COLOR2 , _T("Secondary color"), 2);
	pColorBtn->SetDefaultCommand(FALSE);
	pColorBtn->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
	pColorBtn->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
	pColorBtn->SetColumns(10);
	pColorBtn->SetColorBoxSize(CSize(17, 17));
	pColorBtn->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
	pColorBtn->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
	pColorBtn->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
	pPanel->Add(pColorBtn);

	pBtn=new CMFCRibbonButton (WM_CHART_FORMAT_FILL_GRADIENT, _T("Gradient\nt"),2, -1);
	pBtn->SetMenu(IDR_CHART_GRADIENT,FALSE);
	pPanel->Add (pBtn);


	pBtn=new CMFCRibbonButton (WM_CHART_FORMAT_FILL_HATCH, _T("Hatch style"),-1, 10);
	pBtn->SetMenu(IDR_CHART_FILLHATCHING,FALSE);
	pPanel->Add (pBtn);

	
	pPanel = pCategory3->AddPanel(_T("Outline"), m_PanelImages.ExtractIcon(4));

	pColorBtn = new CMFCRibbonColorButton(WM_CHART_FORMAT_OUTLINE_COLOR ,_T("Color\nso"), 3, -1);
	pColorBtn->SetDefaultCommand(FALSE);
	pColorBtn->EnableAutomaticButton(_T("&Automatic"), RGB(0, 0, 0));
	pColorBtn->EnableOtherButton(_T("&More Colors..."), _T("More Colors"));
	pColorBtn->SetColumns(10);
	pColorBtn->SetColorBoxSize(CSize(17, 17));
	pColorBtn->AddColorsGroup(_T("Theme Colors"), m_lstMainColors);
	pColorBtn->AddColorsGroup(_T(""), m_lstAdditionalColors, TRUE);
	pColorBtn->AddColorsGroup(_T("Standard Colors"), m_lstStandardColors);
	pPanel->Add(pColorBtn);


	pBtn=new CMFCRibbonButton (WM_CHART_FORMAT_FILL_GRADIENT, _T("Style\nt"),3, -1);
	pBtn->SetMenu(IDR_CHART_OUTLINESTYLE,FALSE);
	pPanel->Add (pBtn);
	pBtn=new CMFCRibbonButton (WM_CHART_FORMAT_OUTLINE_SIZE, _T("Size\ns"),3, -1);
	pBtn->SetMenu(IDR_OUTLINE_WIDTH,FALSE);
	pPanel->Add (pBtn);
	
	
	pPanel = pCategory3->AddPanel(_T("Size"), m_PanelImages.ExtractIcon(20));
	CMFCRibbonEdit* pBtn5 = new CMFCRibbonEdit(WM_CHART_FORMAT_SIZEX, 45, NULL, 11);
	pBtn5->EnableSpinButtons(0, 99);
	pBtn5->SetEditText(_T("0"));
	pPanel->Add(pBtn5);
	pBtn5 = new CMFCRibbonEdit(WM_CHART_FORMAT_SIZEY, 45, NULL, 12);
	pBtn5->EnableSpinButtons(0, 99);
	pBtn5->SetEditText(_T("0"));
	pPanel->Add(pBtn5);

	pPanel->SetCenterColumnVert (TRUE);


	pPanel = pCategory3->AddPanel(_T("Orientation"), m_PanelImages.ExtractIcon(20));

	pBtn=new CMFCRibbonButton (WM_CHART_FORMAT_ORIENTATION_ALIGN, _T("Alignment"),6, -1);
	pBtn->SetMenu(IDR_CHART_ALIGNMENT,FALSE);
	pPanel->Add (pBtn);
	
	pBtn=new CMFCRibbonButton (WM_CHART_FORMAT_ORIENTATION_DOCKING, _T("Docking"),8, -1);
	pBtn->SetMenu(IDR_CHART_DOCKING,FALSE);
	pPanel->Add (pBtn);
	
	pPanel->Add(new CMFCRibbonButton(WM_CHART_FORMAT_ORIENTATION_REVERSE, _T("Reverse\nso"), 10, -1));


	//pPanel->Add(new CMFCRibbonButton(ID_CHART_FORMAT_SHAPES_EFFECTS, _T("Shape Effects\nse"), 4, -1));

	// Create "Font" panel:
	CMFCRibbonPanel* pPanelFont = pCategory3->AddPanel(_T("Font"), m_PanelImages.ExtractIcon(2));
	pPanelFont->SetKeys(_T("zf"));

	// Create a new group with 2 elements: font name and font size:
	CMFCRibbonButtonsGroup* pFontGroup = new CMFCRibbonButtonsGroup;

	CMFCRibbonFontComboBox::m_bDrawUsingFont = TRUE;

	CMFCRibbonFontComboBox* pFontCombo = new CMFCRibbonFontComboBox(WM_CHART_FORMAT_FONT_NAME);
	pFontCombo->SetWidth(55, TRUE); // Width in "floaty" mode
	pFontCombo->SelectItem(10);
	pFontGroup->AddButton(pFontCombo);

	CMFCRibbonComboBox* pFontSizeCombo = new CMFCRibbonComboBox(WM_CHART_FORMAT_FONT_SIZE, TRUE, 39);
	pFontSizeCombo->AddItem(_T("8"));
	pFontSizeCombo->AddItem(_T("9"));
	pFontSizeCombo->AddItem(_T("10"));
	pFontSizeCombo->AddItem(_T("11"));
	pFontSizeCombo->AddItem(_T("12"));
	pFontSizeCombo->AddItem(_T("14"));
	pFontSizeCombo->AddItem(_T("16"));
	pFontSizeCombo->AddItem(_T("18"));
	pFontSizeCombo->AddItem(_T("20"));
	pFontSizeCombo->AddItem(_T("22"));
	pFontSizeCombo->AddItem(_T("24"));
	pFontSizeCombo->AddItem(_T("26"));
	pFontSizeCombo->AddItem(_T("28"));
	pFontSizeCombo->AddItem(_T("36"));
	pFontSizeCombo->AddItem(_T("48"));
	pFontSizeCombo->AddItem(_T("72"));
	pFontSizeCombo->SetWidth(20, TRUE); // Width in "floaty" mode
	pFontSizeCombo->SelectItem(3);
	pFontGroup->AddButton(pFontSizeCombo);

	pPanelFont->Add(pFontGroup);

	// Add toolbar(all toolbar buttons will be automatically
	// converted to ribbon elements:
	pPanelFont->AddToolBar(IDR_FONT);

}
Exemple #17
0
void CMainFrame::Add_Category5()
{
	int i = 0;
	
	CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Edit and Combo"), IDB_RIBBON_CATEGORY5_SMALL, 0);

	CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Standard"));

	CMFCRibbonEdit* pBtn1 = new CMFCRibbonEdit(ID_RIBBON_EBTN_1, 90);
	pBtn1->SetEditText(_T("Edit"));
	pPanel1->Add(pBtn1);

	CMFCRibbonEdit* pBtn2 = new CMFCRibbonEdit(ID_RIBBON_EBTN_2, 90);
	pBtn2->EnableSpinButtons(0, 99);
	pBtn2->SetEditText(_T("0"));
	pPanel1->Add(pBtn2);

	CMFCRibbonComboBox* pBtn3 = new CMFCRibbonComboBox(ID_RIBBON_EBTN_3, TRUE, 74);
	pBtn3->AddItem(_T("Combo Box"));
	for (i = 0; i < 20; i++)
	{
		CString str;
		str.Format(_T("Item %d"), i + 1);
		pBtn3->AddItem(str);
	}
	pBtn3->SelectItem(0);
	pPanel1->Add(pBtn3);

	CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("With Icons and Labels"));

	CMFCRibbonEdit* pBtn4 = new CMFCRibbonEdit(ID_RIBBON_EBTN_4, 90, _T("Label:"), 0);
	pBtn4->SetEditText(_T("Edit"));
	pPanel2->Add(pBtn4);

	CMFCRibbonEdit* pBtn5 = new CMFCRibbonEdit(ID_RIBBON_EBTN_5, 90, _T("Label:"), 1);
	pBtn5->EnableSpinButtons(0, 99);
	pBtn5->SetEditText(_T("0"));
	pPanel2->Add(pBtn5);

	CMFCRibbonComboBox* pBtn6 = new CMFCRibbonComboBox(ID_RIBBON_EBTN_6, TRUE, 74, _T("Label:"), 2);
	pBtn6->AddItem(_T("Combo Box"));
	for (i = 0; i < 20; i++)
	{
		CString str;
		str.Format(_T("Item %d"), i + 1);
		pBtn6->AddItem(str);
	}
	pBtn6->SelectItem(0);
	pPanel2->Add(pBtn6);

	CMFCRibbonPanel* pPanel3 = pCategory->AddPanel(_T("Font"));

	CMFCRibbonFontComboBox::m_bDrawUsingFont = TRUE;
	CMFCRibbonFontComboBox* pBtn7 = new CMFCRibbonFontComboBox(ID_RIBBON_EBTN_7);
	pBtn7->SelectItem(_T("Arial"));
	pPanel3->Add(pBtn7);

	pPanel1->SetData(ID_RIBBON_SOURCE_CODE_5_1);
	pPanel2->SetData(ID_RIBBON_SOURCE_CODE_5_2);
	pPanel3->SetData(ID_RIBBON_SOURCE_CODE_5_3);
}
Exemple #18
0
void CMainFrame::InitializeRibbon()
{

	// 设置标题栏
	SetWindowText(_T("密码学盒子 - CryptCube"));

	// 初始主按钮:
	m_MainButton.SetImage(IDP_MAIN);
	m_MainButton.SetText(_T("\nf"));
	m_MainButton.SetToolTipText(_T("主菜单"));

	//主按钮对应的菜单
	m_wndRibbonBar.SetApplicationButton(&m_MainButton, CSize (45, 45));

	CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory(_T(""), IDP_MENU, IDP_MENU,CSize (32, 32),CSize (32, 32));

	pMainPanel->Add(new CMFCRibbonButton(ID_WELCOME, _T("显示欢迎页"), -1, 0));
	pMainPanel->Add(new CMFCRibbonButton(ID_APP_ABOUT, _T("关于密码学盒子"), -1, 1));
	

	pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_APP_EXIT,_T("退出盒子(&X)"), 5));


	// 加载右上方的帮助小按钮:
	m_PanelImages.SetImageSize(CSize(16, 16));
	m_PanelImages.Load(IDP_HELPSMALL);
	//m_wndRibbonBar.AddToTabs(new CMFCRibbonButton(ID_APP_HELP, _T("\na"), m_PanelImages.ExtractIcon (0)));
	m_wndRibbonBar.AddToTabs(new CMFCRibbonButton(ID_APP_ABOUT, _T("\na"), m_PanelImages.ExtractIcon (0)));


	///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	//添加“算法原理”主类别:
	CMFCRibbonCategory* pCategoryPri= m_wndRibbonBar.AddCategory(_T("算法原理"),IDP_TOOLBAR3,IDP_TOOLBAR3,CSize (16, 16),CSize (48, 48));
	
	//添加“古典密码”小面板
	CMFCRibbonPanel* pPriClssic = pCategoryPri->AddPanel(_T("古典密码"));
	pPriClssic->Add(new CKofMFCRibbonButton(ID_CASA, _T("Casar"), -1, 0));
	pPriClssic->Add(new CKofMFCRibbonButton(ID_FSBH, _T("单表置换"), -1, 1));

	
	// 创建“分组密码”小面板:
	CMFCRibbonPanel* pPriBlock = pCategoryPri->AddPanel(_T("分组密码"));
	pPriBlock->Add(new CKofMFCRibbonButton(ID_DES, _T("DES"),-1,2));
	pPriBlock->Add(new CKofMFCRibbonButton(ID_AES, _T("AES"),-1,3));
	pPriBlock->Add(new CKofMFCRibbonButton(ID_IDEA, _T("IDEA"),-1,4));

	// 创建“流密码”小面板:
	CMFCRibbonPanel* pPriStream = pCategoryPri->AddPanel(_T("流密码"));
	pPriStream->Add(new CKofMFCRibbonButton(ID_RC4,_T("RC4"),-1,5));

	// 创建“公钥密码”小面板:
	CMFCRibbonPanel* pPriPublicKey = pCategoryPri->AddPanel(_T("公钥密码"));
	pPriPublicKey->Add(new CKofMFCRibbonButton(ID_RSA, _T("RSA"), -1, 6));
	pPriPublicKey->Add(new CKofMFCRibbonButton(ID_DIFFIE, _T("Diffie-Hellman") ,-1,7));
	pPriPublicKey->Add(new CKofMFCRibbonButton(ID_ELG, _T("ElGmal") ,-1,8));
	pPriPublicKey->Add(new CKofMFCRibbonButton(ID_ECC, _T("ECC") ,-1,9));
	

	// 创建“散列函数”小面板:
	CMFCRibbonPanel* pPriHash = pCategoryPri->AddPanel(_T("散列函数"));
	pPriHash->Add(new CKofMFCRibbonButton(ID_MD5, _T("MD5"),-1,10));
	pPriHash->Add(new CKofMFCRibbonButton(ID_SHA, _T("SHA"),-1,11));

	// 创建“数字签名”小面板:
	CMFCRibbonPanel* pPriSignature = pCategoryPri->AddPanel(_T("数字签名"));
	pPriSignature->Add(new CKofMFCRibbonButton(ID_DSA, _T("DSA"),-1,12));

	///////////////////////////////////////////////////////////////////////////////////////


	// 添加“动态演示”主类别:
	CMFCRibbonCategory* pCategoryHome = m_wndRibbonBar.AddCategory(_T("动态演示"),IDP_TOOLBAR,IDP_TOOLBAR,CSize (16, 16),CSize (48, 48));
	//CMFCRibbonCategory* pCategoryHome = m_wndRibbonBar.AddCategory(_T("动态演示"),IDP_BACKGROUND,IDP_TOOLBAR,CSize (16, 16),CSize (48, 48));
	

	// 创建“古典密码”小面板:
	CMFCRibbonPanel* pPanelClassic = pCategoryHome->AddPanel(_T("古典密码"));
	pPanelClassic->Add(new CKofMFCRibbonButton(ID_CLASSIC_KAISA, _T("凯撒密码"), -1, 0));
	pPanelClassic->Add(new CKofMFCRibbonButton(ID_CLASSIC_DAIHUAN, _T("单表置换"), -1, 1));

	// 创建“分组密码”小面板:
	CMFCRibbonPanel* pPanelBlock = pCategoryHome->AddPanel(_T("分组密码"));
	pPanelBlock->Add(new CKofMFCRibbonButton(ID_BLOCK_DES, _T("DES"),-1,2));
	pPanelBlock->Add(new CKofMFCRibbonButton(ID_BLOCK_AES, _T("AES"),-1,3));
	pPanelBlock->Add(new CKofMFCRibbonButton(ID_BLOCK_IDEA, _T("IDEA"),-1,4));

	// 创建“流密码”小面板:
	CMFCRibbonPanel* pPanelStream = pCategoryHome->AddPanel(_T("流密码"));
	pPanelStream->Add(new CKofMFCRibbonButton(ID_STREAM_RC4,_T("RC4"),-1,5));

	// 创建“公钥密码”小面板:
	CMFCRibbonPanel* pPanelPublicKey = pCategoryHome->AddPanel(_T("公钥密码"));
	pPanelPublicKey->Add(new CKofMFCRibbonButton(ID_PUBLICKEY_RSA, _T("RSA"), -1, 6));
	pPanelPublicKey->Add(new CKofMFCRibbonButton(ID_PUBLICKEY_DH, _T("Diffie-Hellman") ,-1,8));
	pPanelPublicKey->Add(new CKofMFCRibbonButton(ID_PUBLICKEY_ELGAMAL,_T("ElGamal") ,-1,7));
	pPanelPublicKey->Add(new CKofMFCRibbonButton(ID_PUBLICKEY_ECC, _T("ECC") ,0,9));

	// 创建“散列函数”小面板:
	CMFCRibbonPanel* pPanelHash = pCategoryHome->AddPanel(_T("散列函数"));
	pPanelHash->Add(new CKofMFCRibbonButton(ID_HASH_MD5, _T("MD5"),-1,10));
	pPanelHash->Add(new CKofMFCRibbonButton(ID_HASH_SHA, _T("SHA"),-1,11));

	// 创建“数字签名”小面板:
	CMFCRibbonPanel* pPanelSignature = pCategoryHome->AddPanel(_T("数字签名"));
	pPanelSignature->Add(new CKofMFCRibbonButton(ID_SIGNATURE_DSA, _T("DSA"),-1,12));



	////////////////////////////////////////////////////////////////////////////////////////////
	
	// 添加“习题测试”主类别:
	CMFCRibbonCategory* pCategoryTest = m_wndRibbonBar.AddCategory(_T("习题测试"),IDP_TOOLBARTEST,IDP_TOOLBARTEST,CSize (16, 16),CSize (48, 48));
	//pCategoryTest->Add(new CMFCRibbonButton(ID_WELCOME, _T("显示欢迎页"), -1, 0));
	CMFCRibbonPanel* pTestBlock = pCategoryTest->AddPanel(_T("分组密码"));
	pTestBlock->Add(new CKofMFCRibbonButton(ID_TEST_DES_AES, _T("DES-AES"),-1,0));

	CMFCRibbonPanel* pTestPublicKey =pCategoryTest->AddPanel(_T("公钥密码"));
	pTestPublicKey->Add(new CKofMFCRibbonButton(ID_TEST_DIFF, _T("Diffie-Hellman"),-1,1));

	CMFCRibbonPanel* pTestHash =pCategoryTest->AddPanel(_T("散列函数"));
	pTestHash->Add(new CKofMFCRibbonButton(ID_TEST_MD5, _T("MD5-SHA"),-1,2));
	pTestHash->Add(new CKofMFCRibbonButton(ID_TEST_HMAC, _T("HMAC"),-1,3));

	CMFCRibbonPanel* pTestSignature =pCategoryTest->AddPanel(_T("数字签名"));
	pTestSignature->Add(new CKofMFCRibbonButton(ID_TEST_RSA, _T("RSA-DSA"),-1,4));
	
	CMFCRibbonPanel* pTestSecure =pCategoryTest->AddPanel(_T("安全套接层协议"));
	pTestSecure->Add(new CKofMFCRibbonButton(ID_TEST_SSL, _T("SSL"),-1,5));



	///////////////////////////////////////////////////////////////////////////////////
	// 添加“密码学小工具”主类别:
	CMFCRibbonCategory* pCategoryTools = m_wndRibbonBar.AddCategory(_T("密码工具"), IDP_TOOLBAR2,  IDP_TOOLBAR2,CSize (48, 48),CSize (48, 48));
	//pCategoryTools->Add(new CMFCRibbonButton(ID_WELCOME, _T("显示欢迎页"), -1, 0));

	// 创建“密码学小工具”小面板:
	CMFCRibbonPanel* pPanelCalc = pCategoryTools->AddPanel(_T("辅助计算工具"));
	pPanelCalc->Add(new CKofMFCRibbonButton(ID_CODE_CALC, _T("数学知识计算"), -1, 1));
	pPanelCalc->Add(new CKofMFCRibbonButton(ID_CODE_RANDOM, _T("随机生成"), -1, 0));

	CMFCRibbonPanel* pPanelCrypt = pCategoryTools->AddPanel(_T("加密解密相关"));
	//pPanelCrypt->Add(new CKofMFCRibbonButton(ID_ENCRYPT_STRING, _T("文字加解密"), -1, 2));
	//pPanelCrypt->Add(new CKofMFCRibbonButton(ID_ENCRYPT_FILE, _T("文件加解密"), -1, 3));
	pPanelCrypt->Add(new CKofMFCRibbonButton(ID_CODE_HASH, _T("Hash校验"), -1, 2));

	CMFCRibbonPanel* pPanelCode = pCategoryTools->AddPanel(_T("编码转换相关"));
	pPanelCode->Add(new CKofMFCRibbonButton(ID_CODE_STRING, _T("字符编码"), -1, 3));
	//pPanelCode->Add(new CKofMFCRibbonButton(ID_CODE_BASE64, _T("Base64编码"), -1, 4));
	//pPanelCode->Add(new CKofMFCRibbonButton(ID_CODE_URL, _T("URL加解密"), -1, 4));
	//pPanelCode->Add(new CKofMFCRibbonButton(ID_CODE_COLOR, _T("颜色与按键代码"), -1, 5));
	pPanelCode->Add(new CKofMFCRibbonButton(ID_CODE_QR, _T("QRCode二维码"), -1, 4));

	


	/////////////////////////////////////////////////////////////////////////////////////////////
// 添加“密码术语”主类别:

	CMFCRibbonCategory* pCategoryTerm = m_wndRibbonBar.AddCategory(_T("密码术语"),IDP_TOOLBARTERM,IDP_TOOLBARTERM,CSize (48, 48),CSize (48, 48));
	// 创建“古典密码”小面板:
	CMFCRibbonPanel* pPanelTerm = pCategoryTerm->AddPanel(_T("密码术语"));
	pPanelTerm->Add(new CKofMFCRibbonButton(ID_TERM, _T(""), -1, 0));
	
/////////////////////////////////////////////////////////////////////////////////////

//添加“参考资料”类别
	CMFCRibbonCategory* pCategoryAccord = m_wndRibbonBar.AddCategory(_T("参考资料"),IDP_ACCORD,IDP_ACCORD,CSize (48, 48),CSize (48, 48));
	CMFCRibbonPanel* pPanelBook = pCategoryAccord->AddPanel(_T("参考分类"));
	pPanelBook->Add(new CKofMFCRibbonButton(ID_BOOK, _T("课程教材"), -1, 0));
	pPanelBook->Add(new CKofMFCRibbonButton(ID_EXCISE, _T("实践参考"), -1, 1));
	pPanelBook->Add(new CKofMFCRibbonButton(ID_THEORY, _T("理论参考"), -1, 2));
	pPanelBook->Add(new CKofMFCRibbonButton(ID_CLASS, _T("微课参考"), -1, 3));

//高级应用
	CMFCRibbonCategory* pCategoryHigh = m_wndRibbonBar.AddCategory(_T("高级应用"),IDP_HIGH1,IDP_HIGH1,CSize (48, 48),CSize (48, 48));
	CMFCRibbonPanel* pPanelGroup = pCategoryHigh->AddPanel(_T("分组密码典型应用"));
	pPanelGroup->Add(new CKofMFCRibbonButton(ID_HIGH_KER, _T("Kerberos"), -1, 0));

	CMFCRibbonPanel* pPanelPublic = pCategoryHigh->AddPanel(_T("公钥密码典型应用"));
	pPanelPublic->Add(new CKofMFCRibbonButton(ID_HIGH_PKI, _T("PKI"), -1, 1));
	pPanelPublic->Add(new CKofMFCRibbonButton(ID_HIGH_EFS, _T("EFS"), -1, 2));

	CMFCRibbonPanel* pPanelCom = pCategoryHigh->AddPanel(_T("综合应用"));
	pPanelCom->Add(new CKofMFCRibbonButton(ID_HIGH_SSL, _T("SSL"), -1, 3));
	pPanelCom->Add(new CKofMFCRibbonButton(ID_HIGH_OPEN, _T("Openssl"), -1, 4));
	pPanelCom->Add(new CKofMFCRibbonButton(ID_HIGH_PGP, _T("PGP"), -1, 5));
	
	CMFCRibbonPanel* pPanelFile = pCategoryHigh->AddPanel(_T("文件应用"));
	pPanelFile->Add(new CKofMFCRibbonButton(ID_HIGH_FILE, _T("文件安全传输"), -1, 6));

	//可汗学院
	
	CMFCRibbonCategory* pCategoryKhan = m_wndRibbonBar.AddCategory(_T("可汗学院"),IDP_KEHAN,IDP_KEHAN,CSize (48, 48),CSize (48, 48));
	CMFCRibbonPanel* pPanelKhan= pCategoryKhan->AddPanel(_T("KHAN"));
	pPanelKhan->Add(new CKofMFCRibbonButton(ID_KHAN, _T("可汗学院"), -1, 0));
	//pPanelKhan->Add(new CKofMFCRibbonButton(ID_STU, _T("学生作品参考"), -1, 1));
	
	//学生作品
	CMFCRibbonCategory* pCategoryStuwork = m_wndRibbonBar.AddCategory(_T("优秀作品"),IDP_STU,IDP_STU,CSize (48, 48),CSize (48, 48));
	CMFCRibbonPanel* pPanelStuwork= pCategoryStuwork->AddPanel(_T("优秀作品"));
	pPanelStuwork->Add(new CKofMFCRibbonButton(ID_STU, _T(""), -1, 0));
	// 添加快速访问工具栏命令:
	//CList<UINT, UINT> lstQATCmds;

	//lstQATCmds.AddTail(ID_FILE_NEW);
	//lstQATCmds.AddTail(ID_FILE_OPEN);
	//lstQATCmds.AddTail(ID_FILE_SAVE);
	//lstQATCmds.AddTail(ID_FILE_PRINT_DIRECT);
	//OnMenuitemOpen();
	//m_wndRibbonBar.SetQuickAccessCommands(lstQATCmds);

}
Exemple #19
0
void CMainFrame::Add_Category6()
{
	CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory(_T("&Other"), IDB_RIBBON_CATEGORY6_SMALL, IDB_RIBBON_CATEGORY6_LARGE);

	CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("Undo"));

	CMFCRibbonUndoButton* pBtn1 = new CMFCRibbonUndoButton(ID_RIBBON_OBTN_1, _T("Undo"), 0, 0);
	for (int i = 0; i < 20; i++)
	{
		CString str;
		str.Format(_T("Action %d"), i + 1);
		pBtn1->AddUndoAction(str);
	}
	pPanel1->Add(pBtn1);

	CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Label"));

	pPanel2->Add(new CMFCRibbonLabel(_T("Label 1")));
	pPanel2->Add(new CMFCRibbonLabel(_T("Label 2")));
	pPanel2->Add(new CMFCRibbonLabel(_T("Label 3")));

	pPanel2->Add(new CMFCRibbonSeparator());

	pPanel2->Add(new CMFCRibbonLabel(_T("This is a multi-line label"), TRUE));

	CMFCRibbonPanel* pPanel3 = pCategory->AddPanel(_T("Hyperlink"));

	pPanel3->Add(new CMFCRibbonLinkCtrl(ID_RIBBON_OBTN_2, _T("Send e-mail"), _T("mailto:[email protected]")));
	pPanel3->Add(new CMFCRibbonLinkCtrl(ID_RIBBON_OBTN_3, _T("Visit site"), _T("http://www.microsoft.com")));
	pPanel3->Add(new CMFCRibbonLinkCtrl(ID_RIBBON_OBTN_4, _T("Launch Notepad"), _T("notepad")));

	CMFCRibbonPanel* pPanel4 = pCategory->AddPanel(_T("Sliders"));
	pPanel4->SetCenterColumnVert();

	pPanel4->Add(new CMFCRibbonLabel(_T("Simple Slider:")));
	pPanel4->Add(new CMFCRibbonSlider(ID_RIBBON_OBTN_5, 70 /* Slider width */));

	pPanel4->Add(new CMFCRibbonSeparator());

	pPanel4->Add(new CMFCRibbonLabel(_T("Slider with Buttons:")));
	CMFCRibbonSlider* pBtn6 = new CMFCRibbonSlider(ID_RIBBON_OBTN_6, 70 /* Slider width */);
	pBtn6->SetZoomButtons();
	pBtn6->SetRange(0, 100);
	pBtn6->SetPos(50);
	pPanel4->Add(pBtn6);

	CMFCRibbonPanel* pPanel5 = pCategory->AddPanel(_T("Progress Bars"));
	pPanel5->SetCenterColumnVert();

	pPanel5->Add(new CMFCRibbonLabel(_T("Simple Progress:")));
	pPanel5->Add(new CMFCRibbonProgressBar(ID_RIBBON_OBTN_7, 100 /* Bar width */));
	pPanel5->Add(new CMFCRibbonButton(ID_RIBBON_OBTN_8, _T("Show Progress 1")));

	pPanel5->Add(new CMFCRibbonSeparator());

	pPanel5->Add(new CMFCRibbonLabel(_T("Infinite Progress:")));
	CMFCRibbonProgressBar* pBtn9 = new CMFCRibbonProgressBar(ID_RIBBON_OBTN_9, 100 /* Bar width */);
	pBtn9->SetInfiniteMode();
	pPanel5->Add(pBtn9);

	pPanel5->Add(new CMFCRibbonButton(ID_RIBBON_OBTN_10, _T("Show Progress 2")));

	pPanel1->SetData(ID_RIBBON_SOURCE_CODE_6_1);
	pPanel2->SetData(ID_RIBBON_SOURCE_CODE_6_2);
	pPanel3->SetData(ID_RIBBON_SOURCE_CODE_6_3);
	pPanel4->SetData(ID_RIBBON_SOURCE_CODE_6_4);
	pPanel5->SetData(ID_RIBBON_SOURCE_CODE_6_5);
}
Exemple #20
0
void CMainFrame::InitializeRibbon()
{
    CString strTemp;
    strTemp.LoadString(IDS_RIBBON_FILE);

    // Load panel images:
    m_PanelImages.SetImageSize(CSize(16, 16));
    m_PanelImages.Load(IDB_BUTTONS);

    // Init main button:
    m_MainButton.SetImage(IDB_MAIN_AMT);
    m_MainButton.SetText(_T("\nf"));
    m_MainButton.SetToolTipText(strTemp);

    m_wndRibbonBar.SetApplicationButton(&m_MainButton, CSize (45, 45));
    CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory(strTemp, IDB_AMT_FILESMALL, IDB_AMT_FILELARGE);

    strTemp.LoadString(IDS_RIBBON_NEW);
    pMainPanel->Add(new CMFCRibbonButton(ID_EDIT_REFRESH, _T("Refresh\nr"), 25, 14));
    pMainPanel->Add(new CMFCRibbonSeparator(TRUE));

    strTemp.LoadString(IDS_RIBBON_PRINT);
    CMFCRibbonButton* pBtnPrint = new CMFCRibbonButton(ID_FILE_PRINT, strTemp, 6, 6);
    pBtnPrint->SetKeys(_T("p"), _T("w"));
    strTemp.LoadString(IDS_RIBBON_PRINT_LABEL);
    pBtnPrint->AddSubItem(new CMFCRibbonLabel(strTemp));
    strTemp.LoadString(IDS_RIBBON_PRINT);
    pBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT, strTemp, 7, 7, TRUE));
    strTemp.LoadString(IDS_RIBBON_PRINT_SETUP);
    pBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_SETUP, strTemp, 11, 11, TRUE));
    pMainPanel->Add(pBtnPrint);

    pMainPanel->Add(new CMFCRibbonSeparator(TRUE));
    pMainPanel->Add(new CMFCRibbonButton(ID_FILE_LOGOUT, _T("&Logout"), 0, 0, TRUE));
    //pMainPanel->Add(new CMFCRibbonSeparator(TRUE));

    //strTemp.LoadString(IDS_RIBBON_CLOSE);
    //pMainPanel->Add(new CMFCRibbonButton(ID_FILE_CLOSE, strTemp, 9, 9));

    strTemp.LoadString(IDS_RIBBON_RECENT_DOCS);
    pMainPanel->AddRecentFilesList(strTemp);

    strTemp.LoadString(IDS_RIBBON_EXIT);
    pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_APP_EXIT, strTemp, 15));

    // Add "Home" category with "Clipboard" panel:
    strTemp.LoadString(IDS_RIBBON_HOME);
    CMFCRibbonCategory* pCategoryHome = m_wndRibbonBar.AddCategory(strTemp, IDB_AMT_WRITESMALL, IDB_AMT_WRITELARGE);

    // Create "Clipboard" panel:
    strTemp.LoadString(IDS_RIBBON_CLIPBOARD);
    CMFCRibbonPanel* pPanelClipboard = pCategoryHome->AddPanel(strTemp, m_PanelImages.ExtractIcon(27));

    strTemp.LoadString(IDS_RIBBON_PASTE);
    CMFCRibbonButton* pBtnPaste = new CMFCRibbonButton(ID_EDIT_PASTE, strTemp, 0, 0);
    pPanelClipboard->Add(pBtnPaste);

    strTemp.LoadString(IDS_RIBBON_CUT);
    pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_CUT, strTemp, 1));
    strTemp.LoadString(IDS_RIBBON_COPY);
    pPanelClipboard->Add(new CMFCRibbonButton(ID_EDIT_COPY, strTemp, 2));

    // Create "Filter" panel:
    CMFCRibbonPanel* pPanelFilter = pCategoryHome->AddPanel(_T("Filter"));
    pPanelFilter->Add(new CMFCRibbonButton(ID_EDIT_SHOW_ALL, _T("Show All\ns"), 16));
    pPanelFilter->AddSeparator();
    pPanelFilter->Add(new CMFCRibbonCheckBox(ID_EDIT_SHOW_ORPHANS, _T("Show Orphans\no")));
    pPanelFilter->Add(new CMFCRibbonCheckBox(ID_EDIT_SHOW_NOT_MATCHING, _T("Show Differences\nd")));
    pPanelFilter->Add(new CMFCRibbonCheckBox(ID_EDIT_SHOW_MATCHING, _T("Show Matching\nm")));

    CMFCRibbonPanel* pPanelSelection = pCategoryHome->AddPanel(_T("Selection"));
    strTemp.LoadString(IDS_RIBBON_SELECTALL);
    pPanelSelection->Add(new CMFCRibbonButton(ID_EDIT_SELECT_ALL, strTemp, 21));
    pPanelSelection->Add(new CMFCRibbonButton(ID_EDIT_CLEARALL, _T("Clear All\na"), 22));
    pPanelSelection->Add(new CMFCRibbonButton(ID_EDIT_EXPANDALL, _T("Expand All"), 23));
    pPanelSelection->AddSeparator();
    pPanelSelection->Add(new CMFCRibbonButton(ID_EDIT_ADDTOREP, _T("Migrate\nm"), 14));

    CMFCRibbonPanel* pPanelView = pCategoryHome->AddPanel(_T("View"));
    pPanelView->Add(new CMFCRibbonCheckBox(ID_VIEW_CRLF, _T("CR/LF")));
    pPanelView->Add(new CMFCRibbonCheckBox(ID_VIEW_WHITESPACE, _T("Whitespace")));

    CMFCRibbonPanel* pPanelDiferences = pCategoryHome->AddPanel(_T("Differences"));
    pPanelDiferences->Add(new CMFCRibbonButton(ID_DIFFERENCES_PREVIOUS, _T("Previous\nn")));
    pPanelDiferences->Add(new CMFCRibbonButton(ID_DIFFERENCES_NEXT, _T("Next\np")));

    CMFCRibbonPanel* pPanelDependees = pCategoryHome->AddPanel(_T("Dependees"));
    pPanelDependees->Add(new CMFCRibbonButton(ID_DEPENDEES_FINDSERVICES, _T("Find Services")));
    pPanelDependees->Add(new CMFCRibbonButton(ID_DEPENDEES_CALCULATEDEPENDENCIES, _T("Recalculate Cache")));
    pPanelDependees->Add(new CMFCRibbonButton(ID_DEPENDEES_CALCULATECROSSREFERENCE, _T("Calculate Crossreference")));
    pPanelDependees->AddSeparator();
    pPanelDependees->Add(new CMFCRibbonButton(ID_DEPENDEES_SYNCFROMSELECTION, _T("Sync From Selection")));
    pPanelDependees->Add(new CMFCRibbonButton(ID_DEPENDEES_SYNCTOSELECTION, _T("Sync To Selection")));
    pPanelDependees->Add(new CMFCRibbonButton(ID_DEPENDEES_COPYCROSSREFERENCE, _T("Copy Crossreference")));

    CMFCRibbonPanel* pPanelAdvanced = pCategoryHome->AddPanel(_T("Advanced"));
    pPanelAdvanced->Add(new CMFCRibbonCheckBox(ID_EDIT_MODULE_CHECKSUM, _T("Module Checksums\nu")));

    // Add elements to the right side of tabs:
    strTemp.LoadString(IDS_RIBBON_STYLE);
    CMFCRibbonButton* pVisualStyleButton = new CMFCRibbonButton(-1, strTemp, -1, -1);

    pVisualStyleButton->SetMenu(IDR_THEME_MENU, FALSE /* No default command */, TRUE /* Right align */);

    strTemp.LoadString(IDS_RIBBON_STYLE_TIP);
    pVisualStyleButton->SetToolTipText(strTemp);
    strTemp.LoadString(IDS_RIBBON_STYLE_DESC);
    pVisualStyleButton->SetDescription(strTemp);
    m_wndRibbonBar.AddToTabs(pVisualStyleButton);

    // Add quick access toolbar commands:
    CList<UINT, UINT> lstQATCmds;

    lstQATCmds.AddTail(ID_EDIT_REFRESH);
    lstQATCmds.AddTail(ID_FILE_LOGOUT);
    lstQATCmds.AddTail(ID_FILE_PRINT);

    m_wndRibbonBar.SetQuickAccessCommands(lstQATCmds);
    m_wndRibbonBar.AddToTabs(new CMFCRibbonButton(ID_APP_ABOUT, _T("\na"), m_PanelImages.ExtractIcon(0)));
}
Exemple #21
0
void CMainFrame::InitRibbon ()
{
	//-------------------
	// Load panel images:
	//-------------------
	m_PanelImages.SetImageSize (CSize (16, 16));
	m_PanelImages.Load (IDB_BUTTONS);

	//------------------
	// Init main button:
	//------------------
	m_MainButton.SetImage (IDB_MAIN);
	m_MainButton.SetText (_T("\nf"));
	m_MainButton.SetToolTipText (_T("File"));

	m_wndRibbonBar.SetApplicationButton (&m_MainButton, CSize (45, 45));

	m_wndRibbonBar.SetApplicationButton (&m_MainButton, CSize (45, 45));

	CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory (
		_T("File"), IDB_FILESMALL, IDB_FILELARGE);

	pMainPanel->Add (new CMFCRibbonButton (ID_FILE_NEW, _T("&New"), 0, 0));
	pMainPanel->Add (new CMFCRibbonButton (ID_FILE_OPEN, _T("&Open..."), 1, 1));

	pMainPanel->Add (new CMFCRibbonButton (ID_FILE_SAVE, _T("&Save"), 2, 2));

	pMainPanel->Add (new CMFCRibbonButton (ID_FILE_SAVE_AS, _T("Save &As..."), 3, 3));

	std::auto_ptr<CMFCRibbonButton> apBtnPrint(new CMFCRibbonButton (ID_FILE_PRINT, _T("Print"), 6, 6));
	apBtnPrint->SetKeys (_T("p"), _T("w"));

	apBtnPrint->AddSubItem (new CMFCRibbonLabel (_T("Preview and print the document")));
	apBtnPrint->AddSubItem (new CMFCRibbonButton (ID_FILE_PRINT_DIRECT, _T("&Quick Print"), 7, 7, TRUE));
	apBtnPrint->AddSubItem (new CMFCRibbonButton (ID_FILE_PRINT_PREVIEW, _T("Print Pre&view"), 8, 8, TRUE));

	pMainPanel->Add (apBtnPrint.release());

	pMainPanel->Add (new CMFCRibbonSeparator (TRUE));
	pMainPanel->Add (new CMFCRibbonButton (ID_FILE_CLOSE, _T("&Close"), 9, 9));

	pMainPanel->AddRecentFilesList (_T("Recent Documents"));

	pMainPanel->AddToBottom (new CMFCRibbonMainPanelButton (ID_APP_EXIT, _T("E&xit"), 15));

	//--------------------------------------------
	// Add "Home" category with "Clipboard" panel:
	//--------------------------------------------
	CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory (
		_T("&Home"),
		IDB_WRITE,
		IDB_WRITELARGE);

	//--------------------------
	// Create "Clipboard" panel:
	//--------------------------
	CMFCRibbonPanel* pPanelClipboard = pCategory->AddPanel (
		_T("Clipboard\nd"), 
		m_PanelImages.ExtractIcon (27));

	CMFCRibbonButton* pBtnPaste = new CMFCRibbonButton (ID_EDIT_PASTE, _T("Paste\nv"), 0, 0);
	pBtnPaste->SetMenu (IDR_PASTE_MENU, TRUE);
	pPanelClipboard->Add (pBtnPaste);

	pPanelClipboard->Add (new CMFCRibbonButton (ID_EDIT_CUT, _T("Cut\nx"), 1));
	pPanelClipboard->Add (new CMFCRibbonButton (ID_EDIT_COPY, _T("Copy\nc"), 2));
	pPanelClipboard->Add (new CMFCRibbonButton (0, _T("Paint\np"), 3));

	//-----------------------
	// Create "Window" panel:
	//-----------------------
	CMFCRibbonPanel* pPanelWindow = pCategory->AddPanel (
		_T("Window\nw"), 
		m_PanelImages.ExtractIcon (7));

	pPanelWindow->Add (new CMFCRibbonCheckBox (ID_VIEW_WORKSPACE, _T("View 1\n1")));
	pPanelWindow->Add (new CMFCRibbonCheckBox (ID_VIEW_WORKSPACE2, _T("View 2\n2")));
	pPanelWindow->Add (new CMFCRibbonCheckBox (ID_VIEW_OUTPUT, _T("Output\no")));
	pPanelWindow->Add (new CMFCRibbonSeparator);

	CMFCRibbonButton* pBtnWindows = new CMFCRibbonButton (0, _T("Windows\ni"), -1, 1);
	pBtnWindows->SetMenu (IDR_WINDOWS_MENU, TRUE);
	pPanelWindow->Add (pBtnWindows);

	//-----------------------------------
	// Add quick access toolbar commands:
	//-----------------------------------
	CList<UINT, UINT> lstQATCmds;

	lstQATCmds.AddTail (ID_FILE_SAVE);
	lstQATCmds.AddTail (ID_FILE_PRINT_DIRECT);

	m_wndRibbonBar.SetQuickAccessCommands (lstQATCmds);

	m_wndRibbonBar.AddToTabs (new CMFCRibbonButton (ID_APP_ABOUT, _T("\na"), m_PanelImages.ExtractIcon (0)));
}