亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ch10.htm

?? 24小時精通VC
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
<TT>void CMenuView::OnBears()</TT><TT>{</TT><TT>    m_szMsg = &quot;Bears are hungry&quot;;</TT><TT>    InvalidateRect( NULL );</TT></FONT></PRE><P><TT>}</TT> Each of the message-handling functions in Listing 10.6 works in a similarway: A message is stored in the <TT>m_szMsg</TT> member variable, and the view rectangleis invalidated. This causes a <TT>WM_PAINT</TT> message to be sent to the MFC framework,which in turn calls the <TT>OnDraw</TT> function to display the message.</P><P>Build the Menu project. Experiment by right-clicking in the main view window.Selecting any menu item from the shortcut menu will cause a message to be displayed,as shown in Figure 10.4.</P><P><A NAME="04"></A><A HREF="04.htm"><B>Figure 10.4.</B></A> <BR><I>Selecting an item from the context menu.</I><H2><FONT COLOR="#000077"><B>Using Keyboard Accelerators</B></FONT></H2><P><FONT COLOR="#000077"><B>New Term:</B></FONT><B> </B><I>Keyboard accelerators</I>are keyboard shortcuts to message-handling functions.</P><P>A keyboard accelerator provides easy access to commonly accessed program functions.Each keyboard accelerator is a sequence of keystrokes that are translated into aWindows <TT>WM_COMMAND</TT> message, just as if a menu item were selected. This messageis routed to a specific command handler.</P><P>AppWizard creates several keyboard accelerators automatically for your SDI andMDI applications. The following are some of the more common accelerators:<UL>	<LI>Ctrl+N is used to call the <TT>ID_FILE_NEW</TT> command handler.<BR>	<BR>		<LI>Ctrl+C is used to call the <TT>ID_EDIT_COPY</TT> command handler.<BR>	<BR>		<LI>Ctrl+V is used to call the <TT>ID_EDIT_PASTE</TT> command handler.</UL><BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>Just a Minute:</B></FONT><B> </B>There is no requirement	that a keyboard accelerator must be mapped to a menu item. However, finding an action	that is useful as a keyboard accelerator but not useful as a menu item is extremely	rare. <HR></BLOCKQUOTE><H3><FONT COLOR="#000077"><B>Displaying Keyboard Accelerator Resources</B></FONT></H3><P>Keyboard accelerators are resources and are displayed and edited much like menuresources. To see the keyboard accelerators for the Menu sample project, open the<TT>IDR_MAINFRAME</TT> Accelerator resource folder in the project workspace. Thekeyboard accelerators used by the project will be displayed as shown in Figure 10.5.</P><P><A NAME="05"></A> <A HREF="05.htm"><B>Figure 10.5.</B> </A><I><BR>Displaying the keyboard accelerators associated with the Menu sample project.</I><BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>Just a Minute:</B></FONT><B> </B>An MDI program	will have at least two accelerator resources. Only one resource identifier is in	use at a time; the current accelerator resource has the same identifier as the current	menu resource. <HR></BLOCKQUOTE><H3><FONT COLOR="#000077"><B>Adding Keyboard Accelerators</B></FONT></H3><P>To create a new keyboard accelerator, bring up the Accel Properties dialog boxby double-clicking the empty line at the bottom of the accelerator list. The AccelProperties dialog box is shown in Figure 10.6.</P><P><A NAME="06"></A><A HREF="06.htm"><B>Figure 10.6.</B> </A><I><BR>Use the Accel Properties dialog box to add new accelerator resources to your project.</I><BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>Time Saver:</B></FONT><B> </B>You can also bring	up the Accel Properties dialog box by pressing the Insert key on your keyboard. <HR></BLOCKQUOTE><P>Each keyboard accelerator has several properties:<UL>	<LI><I>ID</I> is the <TT>WM_COMMAND</TT> message that will be sent when the accelerator	is invoked. This value is usually a menu item identifier.<BR>	<BR>		<LI><I>Key</I> is the keyboard key that is used to start the accelerator.<BR>	<BR>		<LI><I>Modifiers</I> is used to indicate whether one or more of the Shift, Control,	or Alt keys is pressed as part of the accelerator combination.<BR>	<BR>		<LI><I>Type</I> is used to specify whether the Key value is a virtual key code or	an ASCII value.</UL><P>The simplest way to fill in the Accel Properties dialog box is to click the buttonlabeled Next Key Typed. After clicking this button, the dialog box will use the nextkeystroke combination to fill in the properties for the accelerator.<BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>CAUTION:</B></FONT><B> </B>Avoid using the ASCII	value type for your keyboard accelerators because they behave unpredictably in the	presence of Shift and Caps Lock keys. The virtual keycode is much more reliable and	is not affected by your keyboard's Shift and Caps Lock states. <HR></BLOCKQUOTE><H3><FONT COLOR="#000077"><B>A Keyboard Accelerator Example</B></FONT></H3><P>To illustrate how accelerators are added to Windows applications, you can adda keyboard accelerator to the Menu sample project. The accelerator will perform thesame action as selecting Bears from the pop-up shortcut menu.</P><P>Open the <TT>IDR_MAINFRAME</TT> accelerator resource folder, and add a new acceleratorresource to the Menu project using the values from Table 10.3.<H4><FONT COLOR="#000077">Table 10.3. The new accelerator resource for the Menu project.</FONT></H4><P><TABLE BORDER="1">	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><B>ID</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Key</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Modifiers</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Type</B></TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>ID_BEARS</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>B</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP">Ctrl</TD>		<TD ALIGN="LEFT" VALIGN="TOP">Virtual</TD>	</TR></TABLE></P><P>Build the Menu project. Instead of selecting an item from the shortcut menu, trypressing Ctrl+B on your keyboard; you will get the same message as when you selectBears from the shortcut menu.<H2><FONT COLOR="#000077"><B>Summary</B></FONT></H2><P>In this hour, you learned about the use of menus in Windows applications. Youlearned about the routing of menu command messages, as well as methods for modifyingand creating menu resources. As an example, you created an application that displaysa floating pop-up menu when the right mouse button is clicked.<H2><FONT COLOR="#000077"><B>Q&amp;A</B></FONT></H2><DL>	<DD><B>Q I added a new item to my menu, but it's gray. I've checked the menu attributes	to make sure that the menu should be enabled; why is the menu item still gray?</B><BR>	<BR>	<B>A</B> Make sure that you have provided a message-handling function for the menu	item. The MFC framework will not enable a menu item that doesn't have a message handler.<BR>	<BR>	<B>Q All the menu items with keyboard accelerators that are provided by MFC and AppWizard	place the accelerator label to the far right of the menu window. How can I provide	that effect for my controls?</B><BR>	<BR>	<B>A</B> Use the <TT>\t</TT> tab escape sequence between your menu item and the accelerator	text. For example, the caption for the Bears menu item would be</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><TT>&amp;Bears\tCtrl+B</TT></FONT></PRE></BLOCKQUOTE><PRE><FONT COLOR="#0066FF"><TT></TT></FONT></PRE><H2><FONT COLOR="#000077"><B>Workshop</B></FONT></H2><P>The Workshop is designed to help you anticipate possible questions, review whatyou've learned, and begin thinking ahead to putting your knowledge into practice.The answers to the quiz are found in Appendix B, &quot;Quiz Answers.&quot;<H3><FONT COLOR="#000077"><B>Quiz</B></FONT></H3><DL>	<DD>1. What MFC class is used to manage menus?<BR>	<BR>	2. What message is handled when providing a shortcut menu?<BR>	<BR>	3. What visual cue should be provided for a menu that leads to a dialog box that	requires further input from the user?<BR>	<BR>	4. What is a mnemonic?<BR>	<BR>	5. What is a keyboard accelerator?</DL><H3><FONT COLOR="#000077"><B>Exercises</B></FONT></H3><DL>	<DD>1. The File|Enable Hello and File|Check Hello menu items are not updated to reflect	the current state of the application. Add update command UI handlers for these menu	items so that their captions read File|Disable Hello and File|Uncheck Hello when	appropriate.<BR>	<BR>	2. Add accelerators for the Lions and Tigers shortcut menu items in the Menu project.</DL><CENTER><P><HR><A HREF="../ch09/ch09.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch11/ch11.htm"><IMGSRC="../button/next.gif" WIDTH="128" HEIGHT="28" ALIGN="BOTTOM" ALT="Next chapter"BORDER="0"></A><A HREF="../index.htm"><IMG SRC="../button/contents.gif" WIDTH="128"HEIGHT="28" ALIGN="BOTTOM" ALT="Contents" BORDER="0"></A> <BR><BR><BR><IMG SRC="../button/corp.gif" WIDTH="284" HEIGHT="45" ALIGN="BOTTOM" ALT="Macmillan Computer Publishing USA"BORDER="0"></P><P>&#169; <A HREF="../copy.htm">Copyright</A>, Macmillan Computer Publishing. Allrights reserved.</CENTER></BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97se亚洲国产综合自在线观| 国产精品久久久久久久岛一牛影视| 国内国产精品久久| 国产人成一区二区三区影院| 紧缚捆绑精品一区二区| 国产精品国产三级国产aⅴ原创 | 日本韩国精品在线| 另类欧美日韩国产在线| 日韩av在线播放中文字幕| 国产露脸91国语对白| 一区二区三区在线不卡| 欧美日韩视频在线一区二区| 蜜桃视频一区二区三区在线观看 | 韩国v欧美v亚洲v日本v| 国产精品视频一二| 欧美一区二视频| 国产盗摄一区二区三区| 国产精品的网站| 欧美性色黄大片| 国产一区二区福利| 亚洲一区二区三区美女| 中文字幕av一区二区三区高| 精品国产91乱码一区二区三区| 91麻豆文化传媒在线观看| 国产一区二区三区高清播放| 五月天欧美精品| 亚洲精品成a人| 亚洲国产精品t66y| 久久男人中文字幕资源站| 91精品国产综合久久久久久漫画| 国产精品网站导航| 国产精品久久久久久久久晋中| 国产精品久久网站| 综合久久综合久久| 亚洲国产日韩综合久久精品| 久久精品免费观看| 国产成人午夜片在线观看高清观看| 国产传媒一区在线| 成人av免费在线播放| 在线精品视频一区二区三四| 欧美乱熟臀69xxxxxx| 91精选在线观看| 91精品国产综合久久香蕉麻豆| 91在线观看高清| 成人福利视频网站| 色菇凉天天综合网| 欧美日本不卡视频| 欧美大胆人体bbbb| 亚洲欧美综合网| 国产精品免费aⅴ片在线观看| 日韩一级片在线观看| 日本一区二区三区在线不卡| 国产女人18毛片水真多成人如厕| 国产视频911| 久久久精品天堂| 一区二区欧美视频| 亚洲成人在线免费| 另类欧美日韩国产在线| 日韩欧美你懂的| 欧美日韩高清一区二区不卡| 亚洲欧洲www| 亚洲午夜免费电影| 日本欧美一区二区| www.亚洲人| 日韩一级成人av| 亚洲欧洲综合另类| 国产一区二区不卡在线| 欧洲精品视频在线观看| 久久亚洲综合色| 亚洲mv在线观看| 成人av一区二区三区| 欧美美女直播网站| 国产人成一区二区三区影院| 亚洲一级不卡视频| 国产成人精品影视| 91精品国产综合久久福利软件| 中文字幕日韩一区| 国产乱码一区二区三区| 欧美日韩一区在线观看| 中文字幕一区av| 国产成人午夜视频| 欧美成人精品福利| 亚洲成精国产精品女| 成人深夜在线观看| 精品国产麻豆免费人成网站| 一区二区三区精品视频| 成人黄色网址在线观看| 精品福利在线导航| 日韩精品电影在线观看| 91国产福利在线| 中文字幕亚洲精品在线观看| 国产精品一区二区免费不卡| 日韩女优视频免费观看| 日本伊人色综合网| 欧美日本在线视频| 一区二区高清免费观看影视大全 | 日韩理论片在线| 96av麻豆蜜桃一区二区| 国产精品污网站| 国产九九视频一区二区三区| 日韩女优av电影在线观看| 午夜欧美一区二区三区在线播放| 色综合中文字幕国产 | 香蕉影视欧美成人| 欧美专区日韩专区| 亚洲欧美乱综合| 91免费版在线| 亚洲女同一区二区| 91久久精品一区二区二区| 成人免费视频在线观看| jizzjizzjizz欧美| 综合久久久久综合| 在线视频你懂得一区| 亚洲国产精品久久久久婷婷884| 欧美亚洲国产bt| 亚洲五码中文字幕| 欧美在线观看18| 日本视频免费一区| 精品日产卡一卡二卡麻豆| 狠狠色丁香婷婷综合| 久久久久国产精品麻豆| 国产a精品视频| 亚洲欧美国产三级| 欧美三级日本三级少妇99| 天天操天天干天天综合网| 91精品视频网| 韩国欧美国产一区| 欧美激情在线观看视频免费| 91啪九色porn原创视频在线观看| 夜夜精品视频一区二区| 欧美三级日本三级少妇99| 免费在线观看一区二区三区| 欧美xxxx在线观看| 国产一区美女在线| 亚洲婷婷综合久久一本伊一区| 91精品办公室少妇高潮对白| 午夜视频在线观看一区| 欧美成人r级一区二区三区| 国产成人日日夜夜| 亚洲欧美日韩国产综合在线 | 亚洲美女区一区| 欧美人体做爰大胆视频| 久99久精品视频免费观看| 国产亚洲精品超碰| 色综合色狠狠天天综合色| 首页综合国产亚洲丝袜| 久久久综合精品| 91婷婷韩国欧美一区二区| 五月激情丁香一区二区三区| 精品国产髙清在线看国产毛片| 高清不卡一区二区| 亚洲一区二区中文在线| 久久亚洲私人国产精品va媚药| 99re8在线精品视频免费播放| 亚洲一区二区高清| 久久精品人人做| 欧美丝袜丝交足nylons图片| 免费一级片91| 成人欧美一区二区三区1314| 在线成人免费视频| 成人av动漫在线| 男男成人高潮片免费网站| 日韩理论片网站| 久久亚洲综合色| 欧美日韩成人一区| 丁香激情综合国产| 日韩二区在线观看| 国产精品久久久久影院亚瑟| 日韩欧美在线观看一区二区三区| 成人av网址在线观看| 麻豆国产欧美一区二区三区| 亚洲婷婷国产精品电影人久久| ww久久中文字幕| 欧美日韩激情在线| 波多野结衣在线一区| 久久综合综合久久综合| 亚洲伊人色欲综合网| 国产精品视频一二三| 精品久久久久久久久久久久久久久久久| voyeur盗摄精品| 国产酒店精品激情| 奇米精品一区二区三区四区| 亚洲精品v日韩精品| 国产午夜精品一区二区三区视频 | 制服丝袜中文字幕一区| hitomi一区二区三区精品| 极品尤物av久久免费看| 五月激情综合婷婷| 亚洲综合丝袜美腿| 国产精品国产三级国产aⅴ无密码| 精品国产露脸精彩对白| 91精品午夜视频| 欧美老肥妇做.爰bbww视频| 色哟哟在线观看一区二区三区| 国产乱妇无码大片在线观看| 精品在线免费视频| 美女视频网站久久| 午夜久久电影网| 亚洲午夜三级在线| 亚洲午夜羞羞片|