偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

淺談Visual Studio工具欄

開發(fā) 后端
這里介紹Visual Studio工具欄得到了進一步的加強。除了具備原來的工具欄功能外,因為使用命令按鈕實現(xiàn),還使得工具欄具備了下拉菜單等擴展功能。

#t#Visual Studio經(jīng)過長時間的發(fā)展,很多用戶都很了解Visual Studio工具欄了,這里我發(fā)表一下個人理解,和大家討論討論。在傳統(tǒng)的菜單式界面中,工具欄作為菜單的有益補充,被廣泛使用。我們通過將一些常用命令放置到工具欄上,可以讓用戶直觀而快速地訪問到常用功能,提高了效率。

在Ribbon界面中,Visual Studio工具欄得到了進一步的加強。除了具備原來的工具欄功能外,因為使用命令按鈕實現(xiàn),還使得工具欄具備了下拉菜單等擴展功能。

如下的代碼演示了如何創(chuàng)建Ribbon界面中的Visual Studio工具欄控件:

  1. CMFCRibbonPanel* pPanel1 = pCategory->AddPanel(_T("From Toolbar"));  
  2.  
  3. // 最簡單的,通過AddToolBar()函數(shù),指定一個工具欄資源而創(chuàng)建工具欄  
  4. pPanel1->AddToolBar(IDR_TOOLBAR);  
  5.  
  6. // 手動創(chuàng)建工具欄  
  7. CMFCRibbonPanel* pPanel2 = pCategory->AddPanel(_T("Manual"));  
  8.  
  9. // 創(chuàng)建一個按鈕組  
  10. CMFCRibbonButtonsGroup* pButtonsGroup1 = new CMFCRibbonButtonsGroup;  
  11.  
  12. // 將新的按鈕添加到按鈕組中  
  13. pButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_1, _T(""), 0));  
  14. pButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_2, _T(""), 1));  
  15.  
  16. // 創(chuàng)建一個編輯框控件  
  17. CMFCRibbonEdit* pEdit = new CMFCRibbonEdit(ID_RIBBON_GBTN_3, 65);  
  18. // 設(shè)置默認文本  
  19. pEdit->SetEditText(_T("Edit"));  
  20. pButtonsGroup1->AddButton(pEdit);  
  21.  
  22. pButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_4, _T(""), 2));  
  23. pButtonsGroup1->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_5, _T(""), 3));  
  24.  
  25. // 將按鈕組添加到面板中  
  26. pPanel2->Add(pButtonsGroup1);  
  27.  
  28. // 添加新的按鈕組和按鈕  
  29. CMFCRibbonButtonsGroup* pButtonsGroup2 = new CMFCRibbonButtonsGroup;  
  30. pButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_6, _T(""), 4));  
  31. pButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_7, _T(""), 5));  
  32. pButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_8, _T(""), 6));  
  33. pButtonsGroup2->AddButton(new CMFCRibbonButton(ID_RIBBON_GBTN_9, _T(""), 7));  
  34.  
  35. pPanel2->Add(pButtonsGroup2);  
  36.  
  37. CMFCRibbonButtonsGroup* pButtonsGroup3 = new CMFCRibbonButtonsGroup;  
  38.  
  39. CMFCRibbonButton* pBtn10 = new CMFCRibbonButton(ID_RIBBON_GBTN_10, _T(""), 8);  
  40. pBtn10->SetMenu(IDR_RIBBON_MENU_1);  
  41. pButtonsGroup3->AddButton(pBtn10);  
  42.  
  43. CMFCRibbonButton* pBtn11 = new CMFCRibbonButton(ID_RIBBON_GBTN_11, _T(""), 9);  
  44. // 為按鈕指定一個子菜單  
  45. pBtn11->SetMenu(IDR_RIBBON_MENU_1, TRUE);  
  46. pButtonsGroup3->AddButton(pBtn11);  
  47.  
  48. pPanel2->Add(pButtonsGroup3); 
責任編輯:佚名 來源: 博客
相關(guān)推薦

2009-12-04 16:35:54

Visual Stud

2009-07-01 16:44:48

樣式應(yīng)用工具欄Visual Stud

2011-07-21 16:10:48

jQuery Mobi工具欄

2011-02-22 17:29:24

konqueror

2012-10-11 11:27:05

火狐開發(fā)工具欄

2011-08-25 09:32:30

Visual Stud

2009-08-25 15:52:27

C#工具欄

2009-10-27 09:12:50

Visual Stud

2011-08-02 08:48:58

Visual Stud

2009-11-13 09:51:02

Visual Stud

2009-12-18 13:39:40

Visual Stud

2011-09-19 14:15:17

Vista工具欄

2012-06-19 09:31:53

Windows Pho

2012-07-18 13:35:58

微軟Office 15

2009-05-11 09:45:23

Visual Stud復(fù)制代碼ID

2009-12-16 10:07:26

Visual Stud

2010-05-13 09:21:44

F#Visual Stud

2022-02-11 14:48:57

Chrome谷歌下載欄

2011-07-25 09:47:27

2009-10-30 08:49:30

Windows 7鎖定IE工具欄
點贊
收藏

51CTO技術(shù)棧公眾號