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

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

?? ch11.htm

?? vc學習相關書籍,希望對大家有幫助,如果不好請批評指正
?? HTM
?? 第 1 頁 / 共 2 頁
字號:
<!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.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩欧美高清| 亚洲精品日产精品乱码不卡| 一区二区三区国产精华| 成人h版在线观看| 久久精品人人做人人爽人人| 韩国一区二区在线观看| 日韩区在线观看| 久久99久国产精品黄毛片色诱| 国产成人自拍在线| 日韩久久精品一区| 国产成人在线网站| 亚洲一区二区av在线| 91精品啪在线观看国产60岁| 国产精品综合网| 麻豆精品新av中文字幕| 亚洲色图制服丝袜| 欧美国产一区视频在线观看| 国产精品一区2区| 中文在线一区二区| 欧美日韩高清一区二区不卡| 日本一道高清亚洲日美韩| 中文字幕av一区二区三区| 在线观看91精品国产入口| 国产综合色视频| 亚洲成av人片www| 国产精品人人做人人爽人人添| 欧美日韩精品一区二区| 91亚洲精品乱码久久久久久蜜桃 | 欧美日韩国产区一| 成人激情综合网站| 韩日欧美一区二区三区| 性欧美疯狂xxxxbbbb| 国产精品国产三级国产aⅴ中文| 777奇米成人网| 欧美无砖砖区免费| 不卡在线视频中文字幕| 国产在线一区观看| 裸体一区二区三区| 婷婷六月综合亚洲| 一区二区成人在线| 亚洲日本va午夜在线影院| www激情久久| 国产精品色婷婷| 国产一区二区三区四区五区美女| 婷婷丁香激情综合| 99久久精品99国产精品| 欧亚洲嫩模精品一区三区| 日韩精品自拍偷拍| 亚洲午夜激情网页| 成人午夜精品一区二区三区| 欧美日韩国产三级| 亚洲女人的天堂| 国产精品资源站在线| 欧美一区二区精美| 午夜精品久久久久久| 91在线视频观看| 国产偷v国产偷v亚洲高清| 午夜精品爽啪视频| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 北条麻妃一区二区三区| 日韩一区二区在线播放| 亚洲自拍偷拍网站| 国产精品一区不卡| 精品欧美一区二区三区精品久久| 樱花影视一区二区| 色老汉av一区二区三区| 中文字幕国产一区二区| 国产成人自拍网| 欧美高清在线精品一区| 91一区一区三区| 欧美性大战久久| 中文字幕av不卡| 黄页网站大全一区二区| 色综合久久99| 中文字幕制服丝袜一区二区三区| 亚洲国产va精品久久久不卡综合| 国产一区视频网站| 欧美一区二区三区色| 亚洲靠逼com| 成人黄色一级视频| 欧美日本乱大交xxxxx| 亚洲少妇最新在线视频| 国产精品一级片在线观看| 欧美日韩高清一区| 亚洲午夜一二三区视频| 成人午夜碰碰视频| 精品国产一区二区在线观看| 亚洲大尺度视频在线观看| 99久久精品国产一区| 国产三级精品视频| 国产成人无遮挡在线视频| 欧美一区二区三区在线看| 五月激情综合色| 欧美另类一区二区三区| 一区二区欧美精品| 欧美精品一区二区三区蜜桃视频| 亚洲国产精品久久久久婷婷884 | 日韩电影在线一区二区| 26uuu欧美日本| 色8久久人人97超碰香蕉987| 午夜电影一区二区三区| 日本一区二区免费在线| 欧美丰满一区二区免费视频| 国产一区二区在线看| 欧美熟乱第一页| 亚洲一级二级三级| 欧美一区二区三区四区视频| 久久99国产精品免费| 久久久精品天堂| 国产黄色成人av| 亚洲图片另类小说| 欧美视频在线一区二区三区| 五月天久久比比资源色| 久久久国际精品| 在线观看不卡视频| 久草这里只有精品视频| 亚洲国产精品传媒在线观看| 一本一本久久a久久精品综合麻豆| 亚洲福中文字幕伊人影院| 久久亚洲精品国产精品紫薇| 成人国产视频在线观看| 午夜免费欧美电影| 欧美激情一区在线观看| 欧美理论在线播放| voyeur盗摄精品| 欧美a一区二区| 亚洲码国产岛国毛片在线| 欧美日韩黄色影视| 色婷婷久久99综合精品jk白丝| 男女激情视频一区| 亚洲成人综合网站| 亚洲在线成人精品| 中文在线资源观看网站视频免费不卡| 欧美中文字幕亚洲一区二区va在线| 国内精品国产成人国产三级粉色| 亚洲欧美偷拍另类a∨色屁股| 精品三级av在线| 日韩欧美一卡二卡| 欧美日韩电影在线| 欧美人伦禁忌dvd放荡欲情| 99视频在线精品| 成人国产一区二区三区精品| 国内精品伊人久久久久av一坑 | 亚洲成av人片一区二区梦乃| 国产日韩欧美激情| 国产三级三级三级精品8ⅰ区| 日韩一级高清毛片| 欧美久久婷婷综合色| 欧美日韩大陆一区二区| 在线亚洲高清视频| 在线日韩一区二区| 欧美伊人久久久久久久久影院| 色综合久久九月婷婷色综合| 欧美综合欧美视频| 色播五月激情综合网| 成人不卡免费av| 99久久伊人网影院| 色综合久久六月婷婷中文字幕| 91色视频在线| 欧美日韩一区二区三区四区五区| 欧美日韩国产综合一区二区三区 | 蜜桃一区二区三区在线观看| 免费在线观看不卡| 成人一级视频在线观看| av午夜一区麻豆| 欧美日韩视频第一区| 日韩欧美在线不卡| 中文字幕高清不卡| 日韩精品久久久久久| 国产福利一区二区三区| 欧美亚洲综合一区| 国产性做久久久久久| 五月综合激情网| 99久久精品国产精品久久| 日韩免费电影一区| 一区二区三区美女| 懂色av一区二区夜夜嗨| 91精品国产综合久久久久久久 | 国产成人精品免费| 欧美日韩日日骚| 国产精品欧美一区喷水| 亚洲一卡二卡三卡四卡五卡| 精品一区免费av| 欧美三区在线视频| 欧美国产成人在线| 久久99热国产| 在线成人av网站| 亚洲自拍偷拍欧美| 97久久精品人人澡人人爽| 久久久久久久久久美女| 另类成人小视频在线| 91精品在线麻豆| 亚洲成人综合视频| 欧美日韩五月天| 玉米视频成人免费看| 日本道在线观看一区二区| 国产精品久久久久精k8| 成人白浆超碰人人人人| 国产精品色婷婷| 91国偷自产一区二区使用方法|