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

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

?? ch16.htm

?? 21天學會VC的英文版
?? HTM
?? 第 1 頁 / 共 2 頁
字號:
the existing functionality of the base object. This allows you to define the descendentobject in terms of how it's different from the base object.</P><P>Let's look at how this could work with a thermostat. Suppose you had a basic thermostatthat you could use in just about any setting. You could set the temperature for itto maintain, and it would turn on the heating or the air-conditioning as needed tomaintain that temperature. Now let's say you needed to create a thermostat for usein a freezer. You could start from scratch and build a customized thermostat, oryou could take your existing thermostat and specify how the freezer version differsfrom the original. These differences might include that it's limited to turning onthe air conditioning and could never turn on the heater. You would probably alsoput a strict limit on the range of temperatures to which the thermostat could beset, such as around and below 32[infinity] Fahrenheit, or 0[infinity] Celsius. Likewise,if you needed a thermostat for an office building, you would probably want to limitthe temperature range to what is normally comfortable for people and not allow thetemperature to be set to an extremely cold or hot setting.</P><P>With inheritance in creating your own classes, this method just described representsthe same principle that you want to apply. If possible, you should start with anexisting C++ class that has the basic functionality that you need and then programhow your class is different from the base class that you inherited from. You havethe ability to add new data elements, extend existing functionality, or overrideexisting functionality, as you see fit.</P><P><H3><A NAME="Heading4"></A>Visual C++ Class Types</H3><P>In most application projects, when you are creating a new class, you have a fewoptions on the type of class that you are creating. These options are</P><P><UL>	<LI>Generic class	<P>	<LI>MFC class	<P>	<LI>Form class</UL><P>Which of these types of classes you choose to create depends on your needs andwhat your class will be doing. It also depends on whether your class needs to descendfrom any of the MFC classes.</P><P><H4>Generic Class</H4><P>You use a generic class for creating a class that is inherited from a class youhave already created. This class type is intended for creating classes that are notinherited from any MFC classes (although you have already seen where you need touse it to create classes that are based on MFC classes). If you want to create amore specialized version of the CLine class, for instance, a CRedLine class, thatonly drew in red, you create it as a generic class because it's inherited from anotherclass that you created.</P><P>When you create a generic class, the New Class Wizard tries to locate the declarationof the base class (the header file with the class declared). If it cannot find theappropriate header file, it tells you that you might need to make sure that the headerfile with the base class definition is included in the project. If the base classhappens to be an MFC class that is not accessible as an MFC class (such as CObject),then you can ignore this warning because the correct header file is already partof the project.</P><P><H4>MFC Class</H4><P>If you want to make a reusable class that is based on an existing MFC class, suchas an edit box that automatically formats numbers as currency, you want to createan MFC class. The MFC class type is for creating new classes that are inherited fromexisting MFC classes.</P><P><H4>Form Class</H4><P>The form class is a specialized type of MFC class. You need to create this typeof class if you are creating a new form style window. It can be a dialog, form view,or database view class. This new class will be associated with a document class foruse with the view class. If you are building a database application, you will probablycreate a number of this style of classes.</P><P><H2><A NAME="Heading5"></A>Creating Library Modules</H2><P>When you create new classes for your application, they might be usable in otherapplications as well. Often, with a little thought and effort, classes you createcan be made flexible enough so that they could be used in other applications. Whenthis is the case, you need some way of packaging the classes for other applicationswithout having to hand over all your source code. This is the issue that librarymodules address. They allow you to compile your classes and modules into a compiledobject code library that can be linked into any other Visual C++ application.</P><P>Library modules were one of the first means available to provide compiled codeto other programmers for use in their applications. The code is combined with therest of the application code by the linker as the final step in the compilation process.Library modules are still a viable means of sharing modules with other developers.All the developer needs is the library (.lib) file and the appropriate header filesthat show all the exposed classes, methods, functions, and variables, which the otherprogrammer can access and use. The easiest way to do this is to provide the sameheader file that you used to create the library file, but you can also edit the headerso that only the parts that other programmers need are included.</P><P>By using library files to share your modules with other programmers, you are arrangingthat your part of the application is included in the same executable file as therest of the application. Your modules are not included in a separate file, such asa DLL or ActiveX control. This results in one less file to be distributed with theapplication. It also means that if you make any changes to the module, fix any bugs,or enhance any functionality, then the applications that use your module must berelinked. Using library files has a slight disadvantage to creating DLLs, where youmay be able to just distribute the new DLL without having to make any changes tothe application, but you'll learn all about that tomorrow.</P><P><H2><A NAME="Heading6"></A>Using Library Modules</H2><P>To get a good idea of how to use library modules, it's helpful to create a librarymodule, use it in another application, and then make some modifications to the librarymodule. For today's sample application, you'll create a module that generates a randomdrawing on the window space specified. It'll be able to save and restore any of thesedrawings. You'll then use this module in an SDI application, where every time a newdocument is specified, a new drawing is generated. The initial module will only useeight colors and will generate only a limited number of line sequences. Later, you'llmodify the module so that it will generate any number of colors and will generatea larger number of line sequences.</P><P><H3><A NAME="Heading7"></A>Creating the Library Module</H3><P>To create a library module project, you need to specify in the New dialog thatyou want to create a Win32 Static Library, as shown in Figure 16.1. This tells VisualC++ that the output from the project compilation will be a library module insteadof an executable application. From there, all you have to do is define the classesand add the code. You have the options of including support for MFC and using precompiledheaders in your project, as in Figure 16.2, the only step in the Project Wizard.</P><P>The library that you will create for today's sample application will consist oftwo classes. The first class will be the CLine class that you first created on Day10, &quot;Creating Single Document Interface Applications.&quot; The second classwill be the class that creates the random drawings on the drawing surface. This classwill contain an object array of the CLine objects that it will create and populatewith each of the drawing efforts. This second class will also need functionalityto save and restore the drawing, as well as to delete the existing drawing so thata new drawing can be started. It will need to know the dimensions of the drawingarea so that it can generate a drawing that will fit in the drawing area. Once youcreate this module, you'll take a look at how you can use this module in an applicationproject.</P><P><A HREF="javascript:popUp('16fig01.gif')"><B>FIGURE 16.1.</B></A><B> </B><I>Specifyinga library module project.</I></P><P><A HREF="javascript:popUp('16fig02.gif')"><B>FIGURE 16.2.</B></A><B> </B><I>Specifyingproject support options.</I></P><P><I></I><H4>Creating a Library Project</H4><P>To start the library project for today's example, you need to create a new project,specifying that the project is a Win32 Static Library project. Give the project asuitable name and click OK to create the project.</P><P>For today's sample project, specify on the one wizard step to include both MFCand precompiled header support. Although the precompiled header support is not necessary,it will speed up most compiles that you perform while building the module.</P><P>Once you create your module project, you'll find yourself working with a projectthat has no classes. You've got a blank slate from which you can create 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产目拍亚洲精品99久久精品| 综合久久久久久| 色哟哟精品一区| 成人av在线网| 盗摄精品av一区二区三区| 久久久久久夜精品精品免费| 久久 天天综合| 男人的j进女人的j一区| 精品国产91乱码一区二区三区| 蜜臀av一级做a爰片久久| 日韩欧美美女一区二区三区| 久久精品国产精品青草| 国产欧美精品一区二区三区四区| 国产成人免费在线观看不卡| 国产精品免费av| 国产精品国产三级国产aⅴ中文| 色94色欧美sute亚洲13| 亚洲综合久久av| 日本不卡123| 免费在线看成人av| 国产在线一区二区| 国产成人一区在线| 97精品国产97久久久久久久久久久久 | 成人av网站大全| 色老汉一区二区三区| 蜜桃传媒麻豆第一区在线观看| 国产网红主播福利一区二区| 91成人免费在线| 欧美一区二区三区电影| 精品亚洲国产成人av制服丝袜| 国产精品久久一卡二卡| 91麻豆精品国产自产在线观看一区 | 久久精品夜夜夜夜久久| 在线免费一区三区| 欧美一区欧美二区| 国产精品久久久久影视| 日韩欧美黄色影院| 国产精品美女久久久久久久| 欧美一级欧美三级在线观看 | 成人午夜av在线| 色综合婷婷久久| 日韩精品专区在线| 亚洲男人天堂av| 精品伊人久久久久7777人| 亚洲黄色免费电影| 精品亚洲porn| 欧美日韩国产一级二级| 99久久精品国产一区| 美女久久久精品| 在线精品视频免费播放| 91美女片黄在线观看91美女| 国产精品99久| 日韩色视频在线观看| 欧美男同性恋视频网站| 欧美在线视频全部完| 91丨九色丨黑人外教| 不卡视频免费播放| 精品成人一区二区| 日韩av一二三| 欧美日韩性生活| 日韩美女精品在线| 国产精华液一区二区三区| 国产毛片精品国产一区二区三区| 奇米精品一区二区三区四区| 亚洲mv在线观看| av一区二区久久| 中文字幕第一区综合| 亚洲色图制服诱惑| 成人精品小蝌蚪| 日韩精品一区二区三区老鸭窝| 日韩一级片网站| 日韩在线播放一区二区| 婷婷六月综合网| 欧美日韩日日摸| 亚洲一区二区影院| 欧美在线免费视屏| 亚洲韩国精品一区| 欧美调教femdomvk| 亚洲成人你懂的| 欧美精品乱码久久久久久按摩| 欧美电影在线免费观看| 日韩视频免费直播| 韩国精品在线观看| 久久久欧美精品sm网站| 中文字幕综合网| 99精品久久99久久久久| 欧美乱熟臀69xxxxxx| 精品久久久久一区二区国产| 久久久久久久免费视频了| √…a在线天堂一区| 亚洲精品少妇30p| 欧美色图激情小说| 日韩高清不卡一区二区三区| 国内精品国产成人国产三级粉色| 国产宾馆实践打屁股91| 色一区在线观看| 石原莉奈在线亚洲二区| 国产成人免费视频网站| 欧美亚洲国产怡红院影院| 欧美一级高清大全免费观看| 国产日韩三级在线| 色噜噜狠狠成人中文综合| 日韩欧美一二三| 粉嫩aⅴ一区二区三区四区 | 亚洲一区在线观看免费 | 喷白浆一区二区| 久久久久久久久久久黄色| 亚洲午夜久久久久久久久电影网| 久99久精品视频免费观看| av综合在线播放| 亚洲精品国久久99热| 国产成人精品免费网站| 日韩一卡二卡三卡国产欧美| 一区二区三区在线视频观看58| 国产自产高清不卡| 亚洲一区精品在线| 久久精品人人做人人爽人人| 日本不卡在线视频| 中文字幕免费不卡| 正在播放亚洲一区| 色诱视频网站一区| 激情综合网最新| 日韩精品亚洲一区| 一区二区三区资源| 国产精品视频一二| 久久综合一区二区| 欧美日韩日日骚| 色综合久久久久综合体桃花网| ㊣最新国产の精品bt伙计久久| 国产一区二区三区久久久| 3d动漫精品啪啪一区二区竹菊 | 亚洲成a人片在线观看中文| 国产伦精品一区二区三区免费迷 | 久久亚洲精精品中文字幕早川悠里 | 97久久久精品综合88久久| 91麻豆精品久久久久蜜臀 | 制服丝袜日韩国产| 国产a区久久久| 亚洲黄一区二区三区| 97se亚洲国产综合自在线观| 精品国产sm最大网站| 日韩黄色小视频| 自拍视频在线观看一区二区| 久久国产精品无码网站| 欧美视频一区二区三区| 亚洲女人的天堂| 精品国产免费一区二区三区四区 | 中文字幕高清一区| 91精品国产欧美一区二区18 | 日韩一区二区在线看| 天天色 色综合| 国产精品久久久久三级| 国产成人免费视| 日韩va欧美va亚洲va久久| 欧美日产国产精品| 95精品视频在线| 久久精品国产免费看久久精品| 精品三级av在线| 欧美日韩不卡在线| 91久久精品一区二区| 一区二区三区精品视频| 一本到三区不卡视频| 中文av一区二区| 中文一区一区三区高中清不卡| 黄色小说综合网站| 久色婷婷小香蕉久久| 欧美白人最猛性xxxxx69交| 欧美aaa在线| 午夜精品久久久久久| 国产不卡视频一区| 91丨porny丨在线| 91在线播放网址| 一本到不卡精品视频在线观看 | 国产原创一区二区三区| 日韩欧美国产一区二区三区| 国产成人高清在线| 国产精品亚洲一区二区三区妖精| 久久久影视传媒| 欧美精品一区二区三区四区| 国产精品一二三四区| 亚洲欧洲日韩在线| 日韩美女视频一区| 中文字幕一区在线| 亚洲嫩草精品久久| 国产精品久久久久四虎| 日韩区在线观看| 精品国产第一区二区三区观看体验| 粉嫩久久99精品久久久久久夜 | 韩国毛片一区二区三区| 洋洋成人永久网站入口| 91精品国产日韩91久久久久久| 狠狠色狠狠色综合日日91app| 国产午夜精品一区二区 | 日韩伦理av电影| 亚洲乱码一区二区三区在线观看| 制服视频三区第一页精品| 成人高清免费观看| 欧美日韩一区二区三区在线看| 激情综合五月婷婷| 成人av第一页|