ࡱ> M @+bjbj== PWW='l.,T.$)z  ((((((($* :,0(("("""8("(""$:?%,%n Мi.\k% %$(0$)u% j-!j-%"..Advanced Menus Menu items can be disabled (grayed out) or enabled checked or unchecked You may want to disable a menu item that cannot be applied, rather than allow it to be chosen and then have to bring up an error message or do nothing. For example, you might want to disable an option that is not available at the moment. An alternative would be to remove the unavailable item entirely from the menu. But you may prefer a grayed-out entry, which tells the user that the option is sometimes available. For example: email this document might be grayed out unless the user has a live internet connection. You may want to use a check mark to show whether an item is currently selected. For example, in MathXpert there is a menu item Large Numbers which brings up a popup showing two different ways large numbers can be displayed: 1,234,567 1234567 The one currently in use has a check mark. If the user chooses the unchecked item, the display of numbers changes and the next time this menu is brought up, the check mark is on the other item. We will learn how to do these things in MFC. Updating a Menu Menu item updaters are functions that are called just before a menu item is displayed. The argument passed to an updater is a pointer to an object called a UI command. This object describes any changes that should be made to the appearance of the menu item such as enabled or disabled, checked or unchecked, modifications to the caption, etc.: class CCmdUI { public: // enable or disable menu item: virtual void Enable(BOOL bOn = TRUE); // check or uncheck menu item: virtual void SetCheck(int nCheck = 1); // change menu item caption: virtual void SetText(LPCTSTR lpszText); // etc. }; Let's fix the Weather program so that the menu item Sunshine is disabled when the currently selected weather is already Sunshine. Use Event Handler Wizard. Remember, to do that you open your menu in the menu editor, right click the Sunshine item, then choose Add Event Handler:  Make the selections shown. You have to select the class first and then select the message type. If you first select the message type and then the class, the message type goes back to the first one in the list, so be careful. Then click Add and Edit. Edit the code to look like this: void CWeatherView::OnUpdateWeatherSunshine(CCmdUI* pCmdUI) { CWeatherDoc* pDoc = GetDocument(); if(pDoc->GetWeather() == "Sunshine") pCmdUI->Enable(FALSE); // disable it else pCmdUI->Enable(TRUE); // enable it } Do the same for all four menu items. You can check that it works. Checking and unchecking menu items: void CWeatherView::OnUpdateWeatherSnow(CCmdUI* pCmdUI) { CWeatherDoc* pDoc = GetDocument(); if(pDoc->GetWeather() == "Snow") pCmdUI->SetCheck(1); else pCmdUI->SetCheck(0); } The Class CMenu Menus are objects. They may have a visual appearance, but they also can exist in memory without being displayed. You can, for example, have two menus and switch which one is actually active at a given time. You can create menus dynamically, depending on the run-time situation. You can modify menus dynamically, inserting or deleting items, or changing the text. Example: Show grid on the menu when the grid is not visible; Hide grid on the menu when the grid is visible. This is better than having both items there at all times, and better than having the irrelevant one grayed out. Example: You can have a menu in French and a menu in English. You can switch them while the program is running, in response to a Language | French menu choice or a Langue: Anglais menu choice. Example: When a mathematical expression in MathXpert is selected, the program constructs a menu of things you might be able to do to that expression. There are thousands of possibilities for this menu so it really must be constructed on the fly. The MFC class CMenu is just a wrapper for data structures and functions that already exist in the Windows API: Please read about CMenu in the online help. The next slide shows what you find. If you are reading this on the Web, do not expect the links to be live--this is just cut and pasted. For live links, open Visual C++ online help. Construction PRIVATECMenuConstructs a CMenu object.Initialization PRIVATEHYPERLINK "_mfc_cmenu.3a3a.attach.htm"AttachAttaches a Windows menu handle to a CMenu object.HYPERLINK "_mfc_cmenu.3a3a.detach.htm"DetachDetaches a Windows menu handle from a CMenu object and returns the handle.HYPERLINK "_mfc_cmenu.3a3a.fromhandle.htm"FromHandleReturns a pointer to a CMenu object given a Windows menu handle.HYPERLINK "_mfc_cmenu.3a3a.getsafehmenu.htm"GetSafeHmenuReturns the m_hMenu wrapped by this CMenu object.HYPERLINK "_mfc_cmenu.3a3a.deletetempmap.htm"DeleteTempMapDeletes any temporary CMenu objects created by the FromHandle member function.HYPERLINK "_mfc_cmenu.3a3a.createmenu.htm"CreateMenuCreates an empty menu and attaches it to a CMenu object.HYPERLINK "_mfc_cmenu.3a3a.createpopupmenu.htm"CreatePopupMenuCreates an empty pop-up menu and attaches it to a CMenu object.HYPERLINK "_mfc_cmenu.3a3a.loadmenu.htm"LoadMenuLoads a menu resource from the executable file and attaches it to a CMenu object.HYPERLINK "_mfc_cmenu.3a3a.loadmenuindirect.htm"LoadMenuIndirectLoads a menu from a menu template in memory and attaches it to a CMenu object.HYPERLINK "_mfc_cmenu.3a3a.destroymenu.htm"DestroyMenuDestroys the menu attached to a CMenu object and frees any memory that the menu occupied.Menu Operations PRIVATEHYPERLINK "_mfc_cmenu.3a3a.deletemenu.htm"DeleteMenuDeletes a specified item from the menu. If the menu item has an associated pop-up menu, destroys the handle to the pop-up menu and frees the memory used by it.HYPERLINK "_mfc_cmenu.3a3a.trackpopupmenu.htm"TrackPopupMenuDisplays a floating pop-up menu at the specified location and tracks the selection of items on the pop-up menu.Menu Item Operations PRIVATEHYPERLINK "_mfc_cmenu.3a3a.appendmenu.htm"AppendMenuAppends a new item to the end of this menu.HYPERLINK "_mfc_cmenu.3a3a.checkmenuitem.htm"CheckMenuItemPlaces a check mark next to or removes a check mark from a menu item in the pop-up menu.HYPERLINK "_mfc_cmenu.3a3a.checkmenuradioitem.htm"CheckMenuRadioItemPlaces a radio button next to a menu item and removes the radio button from all of the other menu items in the group.HYPERLINK "_mfc_cmenu.3a3a.setdefaultitem.htm"SetDefaultItemSets the default menu item for the specified menu.HYPERLINK "_mfc_cmenu.3a3a.getdefaultitem.htm"GetDefaultItemDetermines the default menu item on the specified menu.HYPERLINK "_mfc_cmenu.3a3a.enablemenuitem.htm"EnableMenuItemEnables, disables, or dims (grays) a menu item.HYPERLINK "_mfc_cmenu.3a3a.getmenuitemcount.htm"GetMenuItemCountDetermines the number of items in a pop-up or top-level menu.HYPERLINK "_mfc_cmenu.3a3a.getmenuitemid.htm"GetMenuItemIDObtains the menu-item identifier for a menu item located at the specified position.HYPERLINK "_mfc_cmenu.3a3a.getmenustate.htm"GetMenuStateReturns the status of the specified menu item or the number of items in a pop-up menu.HYPERLINK "_mfc_cmenu.3a3a.getmenustring.htm"GetMenuStringRetrieves the label of the specified menu item.HYPERLINK "vcrefcmenugetmenuiteminfo.htm"GetMenuItemInfoRetrieves information about a menu item.HYPERLINK "_mfc_cmenu.3a3a.getsubmenu.htm"GetSubMenuRetrieves a pointer to a pop-up menu.HYPERLINK "_mfc_cmenu.3a3a.insertmenu.htm"InsertMenuInserts a new menu item at the specified position, moving other items down the menu.HYPERLINK "_mfc_cmenu.3a3a.modifymenu.htm"ModifyMenuChanges an existing menu item at the specified position.HYPERLINK "_mfc_cmenu.3a3a.removemenu.htm"RemoveMenuDeletes a menu item with an associated pop-up menu from the specified menu.HYPERLINK "_mfc_cmenu.3a3a.setmenuitembitmaps.htm"SetMenuItemBitmapsAssociates the specified check-mark bitmaps with a menu item.HYPERLINK "_mfc_cmenu.3a3a.getmenucontexthelpid.htm"GetMenuContextHelpIdRetrieves the help context ID associated with the menu.HYPERLINK "_mfc_cmenu.3a3a.setmenucontexthelpid.htm"SetMenuContextHelpIdSets the help context ID to be associated with the menu. Modifying a menu at run time Let's fix the Weather menus so that the menu item for the current selection is just not on the menu, rather than being disabled or checked. Thus when Sunshine is the current weather, the menu will list Cloudy Rainy Snow but not Sunshine. Then when we choose Snow, the menu should read Cloudy Rainy Sunshine That can't be done with a menu updater. We must manipulate the menu as an object. The time to do this is when the document data is changed, in ChangeWeather. static int menuID(CString s) // return the menu id for Rain, Snow, etc. { if(s == "Sunshine") return ID_WEATHER_SUNSHINE; if(s == "Rain") return ID_WEATHER_RAIN; if(s == "Snow") return ID_WEATHER_SNOW; if(s == "Cloudy") return ID_WEATHER_CLOUDY; ASSERT(0); // all possibilities were listed return 0; } void CWeatherDoc::ChangeWeather(CString newWeather) { CWnd* pMain = AfxGetMainWnd(); CMenu* pMenu = pMain->GetMenu(); CMenu* WeatherMenu = pMenu->GetSubMenu(4); WeatherMenu->InsertMenu(-1, MF_BYPOSITION, menuID(m_Weather), m_Weather); //-1 says put it at the bottom m_Weather = newWeather; // this line was there already WeatherMenu->DeleteMenu(menuID(m_Weather), MF_BYCOMMAND); } To make this work properly, we also have to delete the Sunshine menu item from the initial menu in the menu editor. That does not, luckily, also delete the identifier ID_WEATHER_SUNSHINE. By working a bit harder we could get the new item added in the original order instead of at the bottom. Try it at home... +lm}~  C K QvEFWz "#$%KLMSTyzϿѺ 5B*ph0Jj:pU jUj(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w%xYE2g,TӨs5]S4䡟N+ZJV8iV>[|nm=ҍsQԠE뮴6xD`;r A  \;?z;84 Ԉ%<ɤpd 'G߈(pv$IǺl϶,d2] $@@bAKxbAu$(d6d,(%LІ   e   p0@@  :@@d2AfĂbc,A   82 y7<<8fRE&+7bT% utİV@ Z+E   07+A@FV _)"QIENDB`D$<777U U ::D  $<8989U U ::9U U :::U U ::1;U U  ::; U U  ::< U U  ::M=U U ::=U U :: >U U :: K?U U ::DyK F_mfc_cmenu.3a3a.attach.htmDyK F_mfc_cmenu.3a3a.detach.htmDyK F_mfc_cmenu.3a3a.fromhandle.htmDyK F!_mfc_cmenu.3a3a.getsafehmenu.htmDyK F"_mfc_cmenu.3a3a.deletetempmap.htmDyK F_mfc_cmenu.3a3a.createmenu.htmDyK F$_mfc_cmenu.3a3a.createpopupmenu.htmDyK F_mfc_cmenu.3a3a.loadmenu.htmDyK F%_mfc_cmenu.3a3a.loadmenuindirect.htmDyK F _mfc_cmenu.3a3a.destroymenu.htmRD$< @,@ J@U U :: @U U ::DyK F_mfc_cmenu.3a3a.deletemenu.htmDyK F#_mfc_cmenu.3a3a.trackpopupmenu.htmD~$<AA AU U ::BU U ::)CU U ::C U U !::_D"U U #::D$U U %::&U U '::(U U )::I*U U +::,U U -::.U U /::0U U 1::2U U 3::P4U U 5::6U U 7::8U U 9::!:U U ;::<U U =::DyK F_mfc_cmenu.3a3a.appendmenu.htmDyK F"_mfc_cmenu.3a3a.checkmenuitem.htmDyK F'_mfc_cmenu.3a3a.checkmenuradioitem.htmDyK F#_mfc_cmenu.3a3a.setdefaultitem.htmDyK F#_mfc_cmenu.3a3a.getdefaultitem.htmDyK F#_mfc_cmenu.3a3a.enablemenuitem.htmDyK F%_mfc_cmenu.3a3a.getmenuitemcount.htmDyK F"_mfc_cmenu.3a3a.getmenuitemid.htmDyK F!_mfc_cmenu.3a3a.getmenustate.htmDyK F"_mfc_cmenu.3a3a.getmenustring.htmDyK Fvcrefcmenugetmenuiteminfo.htmDyK F_mfc_cmenu.3a3a.getsubmenu.htmDyK F_mfc_cmenu.3a3a.insertmenu.htmDyK F_mfc_cmenu.3a3a.modifymenu.htmDyK F_mfc_cmenu.3a3a.removemenu.htmDyK F'_mfc_cmenu.3a3a.setmenuitembitmaps.htmDyK F)_mfc_cmenu.3a3a.getmenucontexthelpid.htmDyK F)_mfc_cmenu.3a3a.setmenucontexthelpid.htm i0@0 Normal_HmH sH tH <A@< Default Paragraph Font(U@( Hyperlink>*B*@'@'P#$EZ[RSstZ[ivw<=jl I K s  O P u v  ! = ? @ A B C D E V W yzrs  U@17wxE*+;~`)UV8#$eU'(e,-j-/{|  Q !!!/!0!!!!!" """"V"W"^"d"m"n"""###0#\#s###### $,$\$i$k$l$$$$%%%%%%&'8'9':'A'0000 0 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;#@+ "% "% (@+!#$&'?+$LS3>!/%5x2CEq|O^'V#6$TcBS(Vc-Xh +"-| : O @'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXPb$k_K P-0&b$F8̛4쳜,&b$,4~A'I} &b$V)pkIzX_&b$,) f2J:Q &b$;4soO[n &b$v~:ؿ &b$^|a%}r&b$x(9=#&b$(F\UX{` &b$p99 ^%> &b$I2N[*lmsRI &@0(  B S  ?@' _Hlt681744A'A''*`hilms 7 8 > @ F P [ ] a d o | ^ h {   ( . 0 8 P U biz4>W\"/GLdn&5in3Cr|P^'$6UcCSWcYh!+#-; O #####$#%#,#q$$$$$$$$$$$$$$$$$$$$$$$$$%%%%"%$%.%B%H%I%R%U%^%%%%%%%%%%%%%='A'$,EL #2   d p y {  ' v z   ( . ip[`w""##3#9#\#a#y############$$/$6$_$e$l$p$$$$$%%$%/%%%%%='A'3333333333333333333333333333333333333333333333333$T?06xDE}_(V7$dT(d-i,.| P ;'<'A'Michael BeesonMichael BeesonMichael BeesonMichael BeesonMichael BeesonMichael BeesonMichael BeesonBEESON Michael BeesonMichael BeesonUC:\home\homepage\courses\cs130\LectureNotes\5-MenusAndToolbars\5-MenusAndToolbars.doc.a; \^`\o(. hh^h`OJQJo(.a;  U@17wxE*+;~`)UV8#$eU'(e,-j-/{|  Q !!;'A'@;';'0A;';'@'P@UnknownGz Times New Roman5Symbol3& z Arial?5 z Courier New"qh"b&ňF Z EO\/e!20d'73Hf Now, you can do this for all four menu items, and you can also add a function for UPDATE_COMMAND_UIMichael Beeson Michael BeesonOh+'0 $0D \h   g Now, you can do this for all four menu items, and you can also add a function for UPDATE_COMMAND_UINowMichael Beesonoich Normal.dots Michael Beeson9icMicrosoft Word 9.0i@%x@4?@iZ ՜.+,D՜.+,` hp  ?Beeson ConsultingEvE' g Now, you can do this for all four menu items, and you can also add a function for UPDATE_COMMAND_UI Title 8@ _PID_HLINKSAt]W)_mfc_cmenu.3a3a.setmenucontexthelpid.htm]T)_mfc_cmenu.3a3a.getmenucontexthelpid.htmk8Q'_mfc_cmenu.3a3a.setmenuitembitmaps.htm{)N_mfc_cmenu.3a3a.removemenu.htm}9K_mfc_cmenu.3a3a.modifymenu.htmz9H_mfc_cmenu.3a3a.insertmenu.htmt2E_mfc_cmenu.3a3a.getsubmenu.htmJBvcrefcmenugetmenuiteminfo.htmZ?"_mfc_cmenu.3a3a.getmenustring.htmG<!_mfc_cmenu.3a3a.getmenustate.htm] 9"_mfc_cmenu.3a3a.getmenuitemid.htm ^6%_mfc_cmenu.3a3a.getmenuitemcount.htmv63#_mfc_cmenu.3a3a.enablemenuitem.htmf)0#_mfc_cmenu.3a3a.getdefaultitem.htmr)-#_mfc_cmenu.3a3a.setdefaultitem.htmh>*'_mfc_cmenu.3a3a.checkmenuradioitem.htmG '"_mfc_cmenu.3a3a.checkmenuitem.htmm7$_mfc_cmenu.3a3a.appendmenu.htmv'!#_mfc_cmenu.3a3a.trackpopupmenu.htmn#_mfc_cmenu.3a3a.deletemenu.htm/t _mfc_cmenu.3a3a.destroymenu.htm[%_mfc_cmenu.3a3a.loadmenuindirect.htmM_mfc_cmenu.3a3a.loadmenu.htm1f$_mfc_cmenu.3a3a.createpopupmenu.htm`0_mfc_cmenu.3a3a.createmenu.htm[ "_mfc_cmenu.3a3a.deletetempmap.htm^ !_mfc_cmenu.3a3a.getsafehmenu.htmr)_mfc_cmenu.3a3a.fromhandle.htmb:_mfc_cmenu.3a3a.detach.htmg+_mfc_cmenu.3a3a.attach.htm  EventHandler  !"#$%&'(*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnoqrstuvwxyz{|}~Root Entry F̰iData ) 1Tablepj-WordDocumentPSummaryInformation(DocumentSummaryInformation8`CompObjjObjectPool̰ḭi  FMicrosoft Word Document MSWordDocWord.Document.89q