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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ch12.htm

?? 好的教程Vc++21 天
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><HTML><HEAD>	<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1"><SCRIPT LANGUAGE="JavaScript"><!--function popUp(pPage) { var fullURL = document.location; var textURL = fullURL.toString(); var URLlen = textURL.length; var lenMinusPage = textURL.lastIndexOf("/"); lenMinusPage += 1; var fullPath = textURL.substring(0,lenMinusPage); popUpWin = window.open('','popWin','resizable=yes,scrollbars=no,width=525,height=394'); figDoc= popUpWin.document; zhtm= '<HTML><HEAD><TITLE>' + pPage + '</TITLE>'; zhtm += '</head>'; zhtm += '<BODY bgcolor="#FFFFFF">'; zhtm += '<IMG SRC="' + fullPath + pPage + '">'; zhtm += '<P><B>' + pPage + '</B>'; zhtm += '</BODY></HTML>'; window.popUpWin.document.write(zhtm); window.popUpWin.document.close(); // Johnny Jackson 4/28/98 }//-->                                                                </SCRIPT><link rel="stylesheet" href="/includes/stylesheets/ebooks.css">	<META NAME="GENERATOR" Content="Symantec Visual Page Mac 1.1.1">	<TITLE>Teach Yourself Visual C++ 6 in 21 Days -- Ch 12 -- Adding Toolbars and Status Bars</TITLE></HEAD><BODY TEXT="#000000" BGCOLOR="#FFFFFF"><H1 ALIGN="CENTER"><IMG SRC="../button/sams.gif" WIDTH="171" HEIGHT="66" ALIGN="BOTTOM"BORDER="0"><BR>Teach Yourself Visual C++ 6 in 21 Days</H1><CENTER><P><A HREF="../ch11/ch11.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch13/ch13.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> <HR></CENTER><H1 ALIGN="CENTER">- 12 -<BR>Adding Toolbars and Status Bars</H1><H1></H1><UL>	<LI><A HREF="#Heading1">Toolbars, Status Bars, and Menus</A>	<LI><A HREF="#Heading2">Designing a Toolbar</A>	<UL>		<LI><A HREF="#Heading3">Creating a New Toolbar</A>		<LI><A HREF="#Heading4">Attaching the Toolbar to the Application Frame</A>		<LI><A HREF="#Heading5">Controlling the Toolbar Visibility</A>	</UL>	<LI><A HREF="#Heading6">Adding a Combo Box to a Toolbar</A>	<UL>		<LI><A HREF="#Heading7">Editing the Project Resources</A>		<LI><A HREF="#Heading8">Creating the Toolbar Combo Box</A>		<LI><A HREF="#Heading9">Handling the Toolbar Combo Box Events</A>		<LI><A HREF="#Heading10">Updating the Toolbar Combo Box</A>	</UL>	<LI><A HREF="#Heading11">Adding a New Status Bar Element</A>	<UL>		<LI><A HREF="#Heading12">Adding a New Status Bar Pane</A>		<LI><A HREF="#Heading13">Setting a Status Bar Pane Text</A>	</UL>	<LI><A HREF="#Heading14">Summary</A>	<LI><A HREF="#Heading15">Q&amp;A</A>	<LI><A HREF="#Heading16">Workshop</A>	<UL>		<LI><A HREF="#Heading17">Quiz</A>		<LI><A HREF="#Heading18">Exercises</A>	</UL></UL><P><HR SIZE="4"><BR>When you created your SDI and MDI applications, they not only came with default menusalready attached, but also they came with simple toolbars to go with the menus. Thesesimple toolbars had the standard set of functions (New, Open, Save, Print, Cut, Copy,and Paste) that are on the toolbars of most Windows applications. Most applicationsdon't limit their toolbars to just this standard selection of functions but havecustomized toolbars that reflect the specific functionality of the application.</P><P>In addition to the toolbars, the SDI and MDI applications have a status bar atthe bottom of the frame that provides textual descriptions of the toolbar buttonsand menu entries. The status bar also has default areas that display whether theCaps, Num, and Scroll Lock keys are on.</P><P>Today, you will learn</P><P><UL>	<LI>How to design your own toolbar.	<P>	<LI>How to attach your toolbar to the application frame.	<P>	<LI>How to show and hide your toolbar with a menu entry.	<P>	<LI>How to place a combo box on your toolbar.	<P>	<LI>How to display descriptions of your toolbar entries in the status bar.	<P>	<LI>How to add your own status bar elements.</UL><H2><A NAME="Heading1"></A>Toolbars, Status Bars, and Menus</H2><P>One of the driving intentions behind the development of Graphical User Interfaces(GUI) such as Windows was the goal of making computers easier to use and learn. Inthe effort to accomplish this goal, GUI designers stated that all applications shoulduse a standard set of menus and that the menus should be organized in a standardizedmanner. When Microsoft designed the Windows operating system, it followed this samephilosophy, using a standard set of menus organized in a standard order on most ofits applications.</P><P>A funny thing happened once Windows became widely used. The application designersfound that new users still had a difficult time learning new applications and thatadvanced users found the menus cumbersome. As a result, the application designersinvented toolbars as one solution to both problems.</P><P>A toolbar is a small band attached to the window frame or a dialog window thatis floating independent of the application frame. This band (or dialog) has a numberof small buttons containing graphic images that can be used in place of the menus.The application designers place the most commonly used functions for their applicationson these toolbars and do their best to design graphical images that illustrate thefunctions the buttons serve.</P><P>Once advanced users learned what each of the toolbar buttons do, the toolbarswere a hit. However, novice users still had problems learning what the toolbar does.As a result, the application designers went back to the drawing board to come upwith ways to help the new user learn how use the toolbar buttons.</P><P>One of the solutions was to use the information bar that many of them had begunplacing at the bottom of application windows to provide detailed descriptions ofboth menu entries and toolbar buttons. One of the other solutions was to providea little pop-up window with a short description of the button that appears wheneverthe mouse is positioned over the button for more than a couple of seconds. The firstof these solutions became known as the status bar, and the second became known astooltips. Both solutions are in common practice with most Windows applications today.</P><P>If you want to design and use your own toolbars and status bars in your applications,you might think that Visual C++ provides plenty of support for your efforts and evenmakes it easy to implement. After all, Microsoft's own application developers havebeen in the forefront of developing these elements, and most, if not all, of Microsoft'sWindows applications are developed using its own Visual C++. Well, you are correctin making that assumption, and today, you'll learn how to create your own customtoolbars and status bars for your applications.</P><P><H2><A NAME="Heading2"></A>Designing a Toolbar</H2><P>For learning how to create your own toolbar, you will modify the application thatyou created on Day 10, &quot;Creating Single Document Interface Applications,&quot;the SDI drawing application, to add a toolbar for selecting the color to use in drawing.</P><BLOCKQUOTE>	<P><HR><STRONG>NOTE:</STRONG> Although the sample application you are working with today is an	extension to the application you built on Day 10, all file and class names have been	changed from Day10 to Toolbar. If you are making the changes in the Day 10 project,	then when the following text specifies that you make changes to the CToolbarDoc class,	you should make the changes to the CDay10Doc class. Likewise, when you are asked	to edit the Toolbar.rc file, you can edit the Day10.rc file.<HR></BLOCKQUOTE><P>If all you want to do is add a few additional toolbar buttons to the default toolbarthat the AppWizard creates when you start a new SDI or MDI application, you can pullup the toolbar in the Visual C++ designer through the Resource View in the workspacepane and begin adding new buttons. Just as in the Menu Designer, the end of the toolbaralways has a blank entry, waiting for you to turn it into another toolbar button,as shown in Figure 12.1. All you have to do is select this blank button, drag itto the right if you want a separator between it and the button beside it, or dragit to a different position if you want it moved. After you have the button in thedesired location, you paint an icon on the button that illustrates the function thatthe button will trigger. Finally, double-click the button in the toolbar view toopen the button's properties dialog and give the button the same ID as the menu thatit will trigger. The moment that you compile and run your application, you will havea new toolbar button that performs a menu selection that you chose. If you want toget rid of a toolbar button, just grab it on the toolbar view, and drag it off thetoolbar.</P><P><A HREF="javascript:popUp('12fig01tif.gif')"><B>FIGURE 12.1.</B></A><B> </B><I>Thetoolbar designer.</I></P><P><I></I><H3><A NAME="Heading3"></A>Creating a New Toolbar</H3><P>To insert a new toolbar, right-click on the Toolbar folder and select Insert Toolbarfrom the pop-up menu. This creates an empty toolbar with a single blank button. Asyou start drawing an icon on each of the blank buttons in the toolbar, another blankbutton is added on the end.</P><P>For use in your drawing application, fill eight buttons with the eight colorsavailable in the drawing application.</P><P>Once you draw icons on each of the buttons in your toolbar, double-click on thefirst button in the toolbar view. This should open the toolbar button propertiesdialog. In the ID field, enter (or select from the drop-down list) the ID of themenu that this toolbar button should trigger. In the Prompt field, enter the descriptionthat should appear in the status bar for this toolbar button. (If you entered a promptfor the menu, then this field is automatically populated with the menu description.)At the end of the status bar description, add \n and a short description to appearin the tooltips for the toolbar button.</P><BLOCKQUOTE>	<P><HR><STRONG>NOTE:</STRONG> In C/C++, the \n string is a shorthand notation for &quot;begin a	new line.&quot; In the prompt for toolbar buttons and menu entries, this string is	used to separate the status bar descriptions of the menu entries and the tooltips	pop-up prompt that appears when the mouse is held over a toolbar button for a few	seconds. The first line of the prompt is used for the status bar description, and	the second line is used for the tooltips description. The tooltips description is	only used with the toolbars, so there's no reason to add this for menu entries that	will have no toolbar equivalents.<HR></BLOCKQUOTE><P>For example, for the black button on the toolbar that you are creating for yourdrawing application, enter an ID of <B>ID_COLOR_BLACK</B> and a prompt of <B>Blackdrawing color\nBlack</B>, as shown in Figure 12.2.</P><P><A HREF="javascript:popUp('12fig02tif.gif')"><B>FIGURE 12.2.</B></A><B> </B><I>Thetoolbar button properties dialog.</I></P><P>Once you finish designing your toolbar and have icons on all of your buttons withthe properties set for each button, you will change the toolbar ID. In the workspacepane, right-click the new toolbar that you just added and open its properties dialog.Change the toolbar ID to a descriptive name.</P><P>As an example, for the color toolbar that you created for your drawing application,change the toolbar ID to IDR_TBCOLOR.</P><P><H3><A NAME="Heading4"></A>Attaching the Toolbar to the Application Frame</H3><P>In the previous SDI and MDI applications, you didn't add any functionality thatrequired you to touch the frame window. Well, because the toolbar is attached tothe frame, you'll have to begin adding and modifying code in that module. If youopen the CMainFrame class to the OnCreate function, you'll see where it's creatingthe existing toolbar and then later in this function where the toolbar is being attachedto the frame.</P><P>Before you can add your toolbar to the application frame, you need to add a variableto the CMainFrame class to hold the new toolbar. This variable of type CToolBar shouldbe protected in accessibility.</P><P>To add your color toolbar to your draw application, right-click the CMainFrameclass in the Class View tab of the workspace pane. Select Add Member Variable fromthe pop-up menu, and specify the variable type as CToolBar, the name as m_wndColorBar,and the access as protected.</P><P>After you add a variable for your toolbar, you need to add some code in the OnCreatefunction in the CMainFrame class to add the toolbar and attach it to the frame. Makethe modifications in Listing 12.1 to add the color toolbar to your drawing application.</P><P><H4>LISTING 12.1. THE MODIFIED CMainFrame.OnCreate FUNCTION.</H4><PRE> 1:  int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) 2: { 3:     if (CFrameWnd::OnCreate(lpCreateStruct) == -1) 4:         return -1; 5:  6:     if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT,                  &Acirc;WS_CHILD | WS_VISIBLE | CBRS_TOP 7:         | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY |         &Acirc;CBRS_SIZE_DYNAMIC) || 8:         !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) 9:     {10:         TRACE0(&quot;Failed to create toolbar\n&quot;);11:         return -1;      // fail to create12:     }13: 14:     ///////////////////////</PRE><PRE>15:     // MY CODE STARTS HERE</PRE><PRE>16:     ///////////////////////17: 18:     // Add the color toolbar19:     int iTBCtlID;20:     int i;21: 22:     // Create the Color Toolbar23:     if (!m_wndColorBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD |24:         WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS |25:         CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||26:         !m_wndColorBar.LoadToolBar(IDR_TBCOLOR))27:     {28:         TRACE0(&quot;Failed to create toolbar\n&quot;);29:         return -1;      // fail to create30:     }31:     // Find the Black button on the toolbar32:     iTBCtlID = m_wndColorBar.CommandToIndex(ID_COLOR_BLACK);33:     if (iTBCtlID &gt;= 0)34:     {35:         // Loop through the buttons, setting them to act as radio                 &Acirc;buttons36:         for (i= iTBCtlID; i &lt; (iTBCtlID + 8); i++)37:             m_wndColorBar.SetButtonStyle(i, TBBS_CHECKGROUP);38:     }39: 40:     ///////////////////////41:     // MY CODE ENDS HERE42:     ///////////////////////43: 44:     if (!m_wndStatusBar.Create(this) ||

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日一区二区三区| 天天综合色天天综合色h| 精品国产伦一区二区三区免费| 欧美系列一区二区| 色噜噜狠狠色综合欧洲selulu| 99国产精品久久久久久久久久| 国产不卡免费视频| 懂色av中文字幕一区二区三区| 国产剧情一区二区三区| 国产呦精品一区二区三区网站| 国产剧情av麻豆香蕉精品| 欧美亚洲动漫另类| 欧美在线一二三| 欧美三日本三级三级在线播放| 欧美中文字幕不卡| 欧美嫩在线观看| 日韩午夜激情av| 精品日本一线二线三线不卡| 26uuu亚洲婷婷狠狠天堂| 久久综合久久鬼色| 国产精品欧美久久久久一区二区| 亚洲欧洲三级电影| 亚洲小说欧美激情另类| 日韩精品久久理论片| 免费不卡在线观看| 国产精品一级二级三级| av爱爱亚洲一区| 欧美日韩一区小说| 日韩免费一区二区三区在线播放| 精品久久久影院| 国产精品美女久久久久av爽李琼 | 久久久99免费| 国产欧美日本一区二区三区| 亚洲另类在线一区| 五月天中文字幕一区二区| 久久国产精品99久久久久久老狼 | 91国产福利在线| 欧美一区二区在线免费观看| 久久久www免费人成精品| 亚洲人精品午夜| 日本 国产 欧美色综合| 国产成人精品免费一区二区| 欧洲一区二区三区在线| 欧美成人精品二区三区99精品| 国产精品青草综合久久久久99| 亚洲一区二区欧美| 国产高清成人在线| 欧美视频三区在线播放| 精品国产三级电影在线观看| 成人免费一区二区三区视频 | 91丨porny丨在线| 日韩午夜小视频| 日韩伦理电影网| 久久精工是国产品牌吗| 91论坛在线播放| 精品国偷自产国产一区| 尤物在线观看一区| 久久99精品一区二区三区| 在线观看亚洲a| 久久蜜桃av一区二区天堂| 亚洲成人第一页| 欧美一区二区福利在线| 国产精品系列在线| 日韩电影网1区2区| 97精品视频在线观看自产线路二| 欧美一区二区三区在线电影| 国产精品不卡视频| 国精产品一区一区三区mba视频| 欧美亚洲丝袜传媒另类| 国产精品美女久久久久久久| 国产综合一区二区| 91精品国产综合久久精品app| 亚洲欧美偷拍卡通变态| 国产一区二区三区免费| 欧美丰满美乳xxx高潮www| 中文字幕欧美日本乱码一线二线| 蜜臀久久久久久久| 一本一道久久a久久精品 | 精品制服美女丁香| 欧美最猛性xxxxx直播| 国产精品成人免费在线| 国产精品乡下勾搭老头1| 欧美一区二区久久久| 亚洲最快最全在线视频| 成人午夜在线视频| 久久久久久久久久看片| 美女在线观看视频一区二区| 欧美日本韩国一区二区三区视频| 亚洲欧美日韩国产综合在线| 成人av在线网| 欧美激情综合网| 国产麻豆91精品| 精品日韩在线观看| 轻轻草成人在线| 4438x亚洲最大成人网| 一区2区3区在线看| 91麻豆福利精品推荐| 亚洲欧美区自拍先锋| av网站免费线看精品| 国产精品三级电影| 成人黄色大片在线观看| 国产精品色一区二区三区| 国产精品综合在线视频| 精品噜噜噜噜久久久久久久久试看| 一本色道**综合亚洲精品蜜桃冫| 国产日韩成人精品| 懂色av一区二区三区免费观看| 欧美激情艳妇裸体舞| 不卡av在线网| 国产欧美一二三区| 国产成人精品综合在线观看 | 日本不卡在线视频| 日韩亚洲欧美一区| 国产资源精品在线观看| 久久精品一区二区三区不卡牛牛| 国产精品一区二区久久不卡| 国产校园另类小说区| 福利一区在线观看| 日韩伦理电影网| 欧美视频一区在线观看| 偷偷要91色婷婷| 日韩精品一区国产麻豆| 国模冰冰炮一区二区| 国产精品乱码久久久久久| 91亚洲精华国产精华精华液| 亚洲美女在线国产| 欧美日韩黄视频| 美女精品一区二区| 久久婷婷久久一区二区三区| www.欧美日韩| 伊人一区二区三区| 欧美美女直播网站| 精一区二区三区| 国产精品国产三级国产普通话99| 91极品美女在线| 亚洲国产精品一区二区久久恐怖片| 欧美一区二区不卡视频| 国产成人综合亚洲91猫咪| 亚洲女性喷水在线观看一区| 制服丝袜亚洲播放| 国产精品综合久久| 亚洲柠檬福利资源导航| 91精品国产色综合久久| 国产激情一区二区三区四区| 日韩一区日韩二区| 欧美日本国产视频| 成人在线视频一区| 亚洲国产精品精华液网站| 欧美tickling挠脚心丨vk| 懂色av一区二区三区免费观看| 亚洲成人av福利| 国产日产精品1区| 欧美视频中文字幕| 国模无码大尺度一区二区三区| 一区二区三区四区高清精品免费观看 | 3d成人h动漫网站入口| 97精品久久久久中文字幕| 日韩一区二区精品葵司在线| 日韩精品一区二区三区老鸭窝| 欧美一区二区在线免费观看| 91精品国产麻豆国产自产在线| 欧美自拍偷拍午夜视频| 日韩三级伦理片妻子的秘密按摩| 日韩西西人体444www| 国产欧美一区二区三区沐欲| 亚洲婷婷综合久久一本伊一区| 七七婷婷婷婷精品国产| 久久婷婷久久一区二区三区| 99久久亚洲一区二区三区青草| 午夜精品一区二区三区电影天堂 | 欧美性猛交xxxxxxxx| 狠狠网亚洲精品| 亚洲第一二三四区| 国产亚洲一二三区| 欧美体内she精视频| 国产一区二区按摩在线观看| 爽好久久久欧美精品| 中文字幕亚洲欧美在线不卡| 欧美一区二区三区视频| 色婷婷av一区| 成人av中文字幕| 国产精品综合网| 美国精品在线观看| 午夜久久福利影院| 亚洲乱码精品一二三四区日韩在线 | 精品日本一线二线三线不卡| 欧美女孩性生活视频| 色婷婷精品久久二区二区蜜臂av | 本田岬高潮一区二区三区| 久久av中文字幕片| 日日夜夜免费精品视频| 亚洲gay无套男同| 一区二区三区四区中文字幕| 最新国产成人在线观看| 亚洲国产精品99久久久久久久久| 亚洲精品一区二区三区蜜桃下载 | 日韩欧美一区二区视频| 欧美色窝79yyyycom| 色狠狠色噜噜噜综合网| 99久久精品99国产精品|