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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? ch11.htm

?? 好的教程Vc++21 天
?? HTM
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
<!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 11 -- Creating Multiple Document Interface Applications8</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="../ch10/ch10.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch12/ch12.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">- 11 -<BR>Creating Multiple Document Interface Applications</H1><H1></H1><UL>	<LI><A HREF="#Heading1">What Is an MDI Application?</A>	<LI><A HREF="#Heading2">Creating an MDI Drawing Program</A>	<UL>		<LI><A HREF="#Heading3">Building the Application Shell</A>		<LI><A HREF="#Heading4">Building the Drawing Functionality</A>		<LI><A HREF="#Heading5">Adding Menu Handling Functionality</A>	</UL>	<LI><A HREF="#Heading6">Adding a Context Menu</A>	<LI><A HREF="#Heading7">Summary</A>	<LI><A HREF="#Heading8">Q&amp;A</A>	<LI><A HREF="#Heading9">Workshop</A>	<UL>		<LI><A HREF="#Heading10">Quiz</A>		<LI><A HREF="#Heading11">Exercise</A>	</UL></UL><P><HR SIZE="4"><BR>Today, you will learn how to build Multiple Document Interface (MDI) applicationsusing Visual C++. You will be able to build applications that allow users to workon multiple documents at one time, switching between the windows of the applicationto do their work. In this chapter, you will learn</P><P><UL>	<LI>The difference between SDI and MDI applications.	<P>	<LI>How to create an MDI application.	<P>	<LI>How to send multiple menu entries to a single event-handling function.	<P>	<LI>How to add a context menu to a Document/View style application.</UL><H2><A NAME="Heading1"></A>What Is an MDI Application?</H2><P>As far as coding an MDI application with Visual C++, there's little differencebetween creating an SDI and an MDI application. However, when you get deeper intothe two application styles, you'll find quite a few differences. Although an SDIapplication allows the user to work on only one document at a time, it also normallylimits the user to working on a specific type of document. MDI applications not onlyenable the user to work on multiple documents at the same time, but also MDI applicationscan allow the user to work on multiple types of documents.</P><P>An MDI application uses a window-in-a-window style, where there is a frame windowaround one or more child windows. This is a common application style with many popularsoftware packages, including Word and Excel.</P><P>Architecturally, an MDI application is similar to an SDI application. In fact,with a simple MDI application, the only difference is the addition of a second frameclass to the other classes that the AppWizard creates, as shown in Figure 11.1. Asyou can see, the Document/View architecture is still very much the approach you usefor developing MDI applications as well as SDI applications.</P><P><A HREF="javascript:popUp('11fig01.gif')"><B>FIGURE 11.1.</B></A><B> </B><I>TheMDI Document/ View architecture.</I></P><P>When you create an MDI application, you will create just one more class than youcreated with an SDI application. The classes are</P><P><UL>	<LI>The CWinApp derived class	<P>	<LI>The CMDIFrameWnd derived class	<P>	<LI>The CMDIChildWnd derived class	<P>	<LI>The CDocument derived class	<P>	<LI>The CView derived class</UL><P>The two MDI derived classes, CMDIFrameWnd (the CMainFrame class in your project)and CMDIChildWnd (the CChildFrame class in your project), are the only two classesthat are different from the SDI application that you created.</P><P>The first of these two classes, the CMDIFrameWnd-derived CMainFrame, is the mainframe of the application. It provides an enclosed space on the desktop within whichall application interaction takes place. This frame window is the frame to whichthe menu and toolbars are attached.</P><P>The second of these two classes, the CMDIChildWnd-derived CChildFrame class, isthe frame that holds the CView class. It is the frame that passes messages and eventsto the view class for processing or display.</P><P>In a sense, the functionality of the frame class in the SDI application has beensplit into these two classes in an MDI application. There is additional support forrunning multiple child frames with their own document/view class instances at thesame time.</P><P><H2><A NAME="Heading2"></A>Creating an MDI Drawing Program</H2><P>To get a good understanding of just how alike the Document/View architecturesare for the SDI and MDI applications, today you will implement that same drawingapplication that you created yesterday, only this time as an MDI application.</P><P><H3><A NAME="Heading3"></A>Building the Application Shell</H3><P>To create the application shell for today's application, follow these steps:</P><P><DL>	<DT></DT>	<DD><B>1. </B>Create a new AppWizard project. Name the project <B>Day11</B>.	<P>	<DT></DT>	<DD><B>2. </B>On the first step of the AppWizard, select Multiple Documents, as shown	in Figure 11.2.	<P></DL><P><A HREF="javascript:popUp('11fig02.gif')"><B>FIGURE 11.2.</B></A><B> </B><I>Specifyingan MDI application.</I></P><P><I></I><DL>	<DT><I></I></DT>	<DD><B>3. </B>Use the default values on the second step of the AppWizard.	<P>	<DT></DT>	<DD><B>4. </B>On the third step of the AppWizard, uncheck the support for ActiveX	Controls.	<P>	<DT></DT>	<DD><B>5. </B>On the fourth step of the AppWizard, leave all the default values.	Click the Advanced button.	<P>	<DT></DT>	<DD><B>6. </B>In the Advanced Options dialog, enter a three-letter file extension	for the files that your application will generate (for example, dhc or dvp). Click	the Close button to close the dialog and then click Next to move to the next step	of the AppWizard.	<P>	<DT></DT>	<DD><B>7. </B>Use the default settings on the fifth step of the AppWizard.	<P>	<DT></DT>	<DD><B>8. </B>On the sixth and final AppWizard step, leave the base class as CView	and click Finish. The AppWizard generates the application shell.	<P></DL><H3><A NAME="Heading4"></A>Building the Drawing Functionality</H3><P>Because you are creating the same application that you created yesterday, onlyas an MDI application this time, you need to add the same functionality to the applicationthat you added yesterday. To save time, and to reemphasize how alike these two applicationarchitectures are, perform the same steps you did yesterday to create the CLine classand add the functionality to the CDay11Doc and CDay11View classes. Add the supportinto the CDay11Doc and CLine classes for selecting colors and widths, but do notadd any menu event message handlers or create the color menu. When you finish addingall that functionality, you should have an application in which you can open multipledrawings, all drawing with only the color black.</P><BLOCKQUOTE>	<P><HR><STRONG>CAUTION:</STRONG> Because you haven't created the menus yet, and the color initialization	uses the color menu IDs, you will probably have to hard-code the initialization of	the color to 0 to get your application to compile. Once you add the color menu, the	menu IDs should have been added, so you will be able to return to using the IDs in	your code. For the time being, change the line of code in the OnNewDocument function	in the CDay11Doc class from	<PRE>    m_nColor = ID_COLOR_BLACK - ID_COLOR_BLACK;</PRE></BLOCKQUOTE><PRE></PRE><BLOCKQUOTE>	<P>to<BR>	m_nColor = 0;<BR>	You will also need to make the same sort of change to the GetColor function because	it uses one of the color menu IDs also.<HR></BLOCKQUOTE><H3><A NAME="Heading5"></A>Adding Menu Handling Functionality</H3><P>Now that you've got all the functionality in your application, you would probablylike to add the color menu so you can use all those available colors in your drawings.When you expand the Resource View tree and look in the Menu folder, you'll find notone, but two menus defined. Which one do you add the color menu to?</P><P>The IDR_MAINFRAME menu is the menu that is available when no child windows areopen. If you run your application and close all child windows, you'll see the menuchange, removing all the menus that apply to child windows. Once you open anotherdocument, either by creating a new document or by opening an existing document, themenu changes back, returning all the menus that apply to the documents.</P><P>The IDR_DAY11TYPE menu is the menu that appears when a child window is open. Thismenu contains all the functions that apply to documents. Therefore, this is the menuthat you need to add the color menu to. Add the color menu by following the samedirections as yesterday, using the same menu properties.</P><P>Once you add all the menus, you need to add the menu event handlers. Today, youare going to take a different approach to implementing the menu event handlers thanyou did yesterday. The Q&amp;A section at the end of yesterday's chapter had a discussionof using a single event-handler function for all the color menus. That is what youare going to implement today. Unfortunately, the Class Wizard doesn't understandhow to route multiple menu event messages to the same function correctly, so you'regoing to implement this yourself by following these steps:</P><P><DL>	<DT></DT>	<DD><B>1. </B>Open the Day11Doc.h header file.	<P>	<DT></DT>	<DD><B>2. </B>Scroll down toward the bottom of the header file until you find the	protected section where the AFX_MSG message map is declared (search for //{{AFX_MSG(CDay11Doc)).	<P>	<DT></DT>	<DD><B>3. </B>Add the function declarations in Listing 11.1 before the line that	you searched for. (The string that you searched for is the beginning marker for the	Class Wizard maintained message map. Anything you place between it and the end marker,	//}}AFX_MSG, is likely to be removed or corrupted by the Class Wizard.)	<P></DL><H4>LISTING 11.1. THE EVENT-HANDLER DECLARATIONS IN Day11Doc.h.</H4><PRE>... 1: #ifdef _DEBUG 2:     virtual void AssertValid() const; 3:     virtual void Dump(CDumpContext&amp; dc) const; 4: #endif 5:  6: protected: 7:  8: // Generated message map functions 9: protected:10:     afx_msg void OnColorCommand(UINT nID);11:     afx_msg void OnUpdateColorUI(CCmdUI* pCmdUI);12:     //{{AFX_MSG(CDay11Doc)13:        // NOTE - the ClassWizard will add and remove member functions &Acirc;here.14:        //    DO NOT EDIT what you see in these blocks of generated &Acirc;code !15:     //}}AFX_MSG16:     DECLARE_MESSAGE_MAP()17: private:18:     UINT m_nColor;19:     CObArray m_oaLines;</PRE><PRE>20: };</PRE><P><DL>	<DT></DT>	<DD><B>4. </B>Open the Day11Doc.cpp source-code file.

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩高清一区在线| 亚洲欧美激情一区二区| 亚洲黄色av一区| 精品一区二区成人精品| 91成人在线精品| 欧美激情在线看| 日本美女视频一区二区| 色呦呦国产精品| 久久久不卡网国产精品二区| 午夜欧美一区二区三区在线播放| 不卡一卡二卡三乱码免费网站| 欧美va亚洲va香蕉在线| 亚洲午夜成aⅴ人片| 91在线视频播放| 久久综合国产精品| 美腿丝袜亚洲一区| 欧美区在线观看| 一区二区三区在线不卡| gogogo免费视频观看亚洲一| 久久久久国产精品厨房| 青青草视频一区| 欧美日韩一区二区三区四区| 亚洲欧美影音先锋| 成人午夜大片免费观看| 精品国产一区二区在线观看| 麻豆精品国产传媒mv男同| 欧美肥妇bbw| 亚洲国产日韩综合久久精品| 色视频成人在线观看免| ●精品国产综合乱码久久久久| 国产成人av一区二区三区在线 | 欧美日韩精品一区二区天天拍小说| 国产精品久久久久久久久免费丝袜| 狠狠色丁香婷婷综合久久片| 欧美一区二区免费| 日韩福利电影在线| 制服丝袜中文字幕亚洲| 天天影视网天天综合色在线播放| 欧美亚日韩国产aⅴ精品中极品| 亚洲图片欧美激情| 91最新地址在线播放| 亚洲视频狠狠干| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 日韩av电影一区| 欧美麻豆精品久久久久久| 五月天网站亚洲| 91精品国产免费| 日本午夜精品视频在线观看| 日韩三级在线观看| 久久国产精品色| 久久久99久久| 国产xxx精品视频大全| 欧美国产日韩一二三区| 99这里只有精品| 亚洲猫色日本管| 欧美色男人天堂| 日韩成人dvd| 欧美大片顶级少妇| 国产精品一区二区三区网站| 国产色爱av资源综合区| 成人激情免费网站| 亚洲免费观看高清完整| 精品视频在线免费观看| 午夜精品福利在线| 精品成人a区在线观看| 国产精品亚洲综合一区在线观看| 国产日产欧美一区| 一本一道久久a久久精品| 亚洲国产日韩a在线播放| 91精品国产综合久久久久久久 | 综合欧美一区二区三区| 欧美亚洲日本一区| 日本不卡一二三| 久久久亚洲欧洲日产国码αv| 国产99久久久精品| 一区二区三区四区亚洲| 678五月天丁香亚洲综合网| 韩国精品在线观看| 中文一区在线播放| 欧美在线观看一区| 裸体一区二区三区| 中日韩免费视频中文字幕| 欧洲精品在线观看| 久久精品国产一区二区三| 国产三级欧美三级| 91国产免费看| 久久国产精品第一页| 国产精品国产三级国产专播品爱网| 欧美自拍偷拍一区| 极品少妇一区二区三区精品视频| 亚洲国产精华液网站w| 欧美日韩一卡二卡| 国产成人午夜精品影院观看视频| 一区二区不卡在线视频 午夜欧美不卡在| 在线成人高清不卡| 成人中文字幕电影| 五月天久久比比资源色| 国产亚洲精品aa午夜观看| 在线观看日韩av先锋影音电影院| 日本亚洲一区二区| 国产精品久久777777| 欧美精品乱人伦久久久久久| 国产成人精品午夜视频免费| 亚洲国产精品人人做人人爽| 国产午夜精品理论片a级大结局 | 国产91丝袜在线播放| 亚洲国产精品久久久久秋霞影院 | 欧美日韩一区二区在线观看| 国产成人综合自拍| 日韩成人午夜电影| 亚洲精品成人少妇| 国产视频不卡一区| 日韩限制级电影在线观看| 99久久精品免费| 国产呦精品一区二区三区网站| 亚洲成人激情综合网| 国产精品免费aⅴ片在线观看| 91精品国产日韩91久久久久久| www.一区二区| 激情图片小说一区| 亚洲第一福利一区| 1区2区3区精品视频| 久久久亚洲精品一区二区三区 | 国产麻豆精品在线观看| 丝袜亚洲另类欧美综合| 自拍偷拍亚洲激情| 久久久久久久久久久久久久久99 | 色94色欧美sute亚洲线路二 | 亚洲国产日韩a在线播放性色| 国产精品久久毛片av大全日韩| 精品美女一区二区三区| 欧美少妇xxx| 93久久精品日日躁夜夜躁欧美| 国产一区二区伦理片| 日韩av一二三| 亚洲综合在线五月| 亚洲视频精选在线| 国产精品久久久久久久裸模| 久久久av毛片精品| 久久一区二区视频| 欧美va在线播放| 91精品婷婷国产综合久久| 成人v精品蜜桃久久一区| 亚洲欧美在线视频| 精品一区二区三区免费毛片爱| 欧美日韩在线综合| 亚洲午夜电影网| 欧美嫩在线观看| 丁香激情综合国产| 国产91丝袜在线18| av一区二区三区在线| 岛国av在线一区| 国产精品一区二区久久不卡| 国产日韩欧美激情| 欧美日韩日日骚| 精品一区二区在线免费观看| 最新中文字幕一区二区三区 | 亚洲免费在线观看视频| 欧美日韩一级黄| 久久成人羞羞网站| 欧美国产丝袜视频| 成人av免费在线| 亚洲综合在线五月| 欧美一区二区三级| 高清日韩电视剧大全免费| 欧美国产日韩一二三区| 99re在线视频这里只有精品| 亚洲日本电影在线| 亚洲精品一区二区三区福利| 99v久久综合狠狠综合久久| 亚洲精品久久久久久国产精华液| 久久久美女毛片| 欧美精品色综合| 欧美亚洲精品一区| 97超碰欧美中文字幕| 久久精品国产澳门| 亚洲乱码一区二区三区在线观看| 精品国产sm最大网站| 色94色欧美sute亚洲线路一久| 国产成人高清在线| 午夜伊人狠狠久久| 亚洲欧美自拍偷拍| 久久综合九色综合欧美就去吻 | 国产精品人成在线观看免费| 在线观看亚洲专区| 成人免费黄色在线| 国产中文字幕一区| 亚洲成人资源网| 欧美国产在线观看| 91精品久久久久久久久99蜜臂| 日本乱码高清不卡字幕| 国产美女精品一区二区三区| 亚洲综合视频在线观看| 久久久久久久久久久久久夜| 在线观看av不卡| 一本在线高清不卡dvd| 成人激情午夜影院| 国产大陆亚洲精品国产| 国产一区二区三区精品欧美日韩一区二区三区| 中文字幕成人av|