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

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

?? ch16.htm

?? /// //Visual C++ 6.0 21天自學(xué)教程
?? HTM
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
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 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人鲁色资源国产91色综| 99久久精品国产毛片| 中文字幕乱码日本亚洲一区二区| 在线看国产一区| 国产一区二区三区av电影| 亚洲国产裸拍裸体视频在线观看乱了 | 国产精品久久久久7777按摩| 欧美精品在欧美一区二区少妇| 成人一级视频在线观看| 久久精品国产久精国产| 亚洲综合免费观看高清在线观看| 久久精品亚洲一区二区三区浴池 | 日韩免费在线观看| 91成人网在线| 99re这里只有精品首页| 国产福利91精品| 麻豆精品在线观看| 亚洲成av人影院| 一级中文字幕一区二区| 国产精品日日摸夜夜摸av| 久久久亚洲高清| 久久这里只有精品视频网| 欧美一区二区精美| 在线不卡中文字幕播放| 欧美午夜寂寞影院| 欧美网站一区二区| 欧美视频精品在线| 欧美日韩国产综合草草| 日本黄色一区二区| 色综合色综合色综合| av午夜精品一区二区三区| 成人中文字幕在线| 国产成人免费在线观看不卡| 激情五月婷婷综合网| 久久99国产精品尤物| 欧美激情一二三区| 蜜臀久久99精品久久久久宅男| 色猫猫国产区一区二在线视频| 丝袜美腿亚洲综合| 日韩中文字幕一区二区三区| 午夜视频一区在线观看| 日本一道高清亚洲日美韩| 丝袜美腿亚洲色图| 另类人妖一区二区av| 精品一二三四在线| 国产成人福利片| 99久久久精品| 欧美色国产精品| 91精品国产综合久久久蜜臀粉嫩 | 国产精品羞羞答答xxdd| 国产成人自拍网| 成人黄色国产精品网站大全在线免费观看 | 91一区一区三区| 在线观看三级视频欧美| 欧美日本高清视频在线观看| 欧美精品123区| 久久综合九色综合97婷婷| 国产无人区一区二区三区| 中文字幕在线观看一区| 亚洲国产欧美在线人成| 日韩电影免费在线观看网站| 精品一区二区三区免费视频| 国产suv精品一区二区三区| 成人爽a毛片一区二区免费| 91丨porny丨最新| 91麻豆精品国产91久久久资源速度 | 亚洲伦理在线免费看| 亚洲主播在线观看| 日韩高清中文字幕一区| 国内精品国产成人国产三级粉色| 国产91丝袜在线观看| 99国产欧美久久久精品| 欧美日韩国产天堂| 精品电影一区二区| 亚洲色图在线播放| 日韩精品免费视频人成| 国产91丝袜在线播放九色| 91视频.com| 日韩一区二区免费高清| 国产精品午夜在线观看| 午夜婷婷国产麻豆精品| 国产成人精品一区二| 欧美午夜不卡视频| 久久综合狠狠综合久久综合88| 亚洲三级在线播放| 麻豆精品新av中文字幕| 波多野结衣在线aⅴ中文字幕不卡| 欧美专区亚洲专区| 久久综合色一综合色88| 一区二区三区产品免费精品久久75| 日本欧美加勒比视频| 成人福利视频在线看| 这里只有精品视频在线观看| 亚洲欧美在线aaa| 久久不见久久见中文字幕免费| 一本色道综合亚洲| 久久久久久97三级| 天堂久久一区二区三区| av中文字幕不卡| 日韩精品一区二区三区蜜臀 | 亚洲日本va在线观看| 国产成人a级片| 欧美日韩一区成人| 日韩欧美国产一区在线观看| 欧美国产一区在线| 久久97超碰国产精品超碰| 色诱视频网站一区| 91亚洲国产成人精品一区二三| 成人综合婷婷国产精品久久蜜臀| 欧美日韩亚洲另类| 欧美精品 日韩| 国产传媒欧美日韩成人| 成人午夜av影视| 91福利在线导航| 日韩欧美一区二区久久婷婷| 日本一区二区三区在线不卡| 亚洲美女一区二区三区| 日本一道高清亚洲日美韩| 国产成a人无v码亚洲福利| 色婷婷久久久久swag精品 | 日韩欧美一区二区在线视频| 日本一区二区在线不卡| 亚洲成人免费在线| 国产精品18久久久久| 欧美日韩精品一区二区三区四区| www国产成人| 午夜视频一区在线观看| 成人性生交大片免费看中文网站| 91国在线观看| 国产视频一区在线观看| 婷婷激情综合网| 不卡影院免费观看| 精品国产免费一区二区三区四区 | 麻豆精品一区二区| 91电影在线观看| 国产日韩欧美在线一区| 日本亚洲视频在线| 一本在线高清不卡dvd| 国产亚洲精品久| 免费人成黄页网站在线一区二区| 色老汉一区二区三区| 久久九九久久九九| 久久精品国产99国产| 欧美日韩亚洲丝袜制服| 亚洲欧美视频在线观看视频| 国产盗摄一区二区| 日韩一级视频免费观看在线| 亚洲一区二区中文在线| 91偷拍与自偷拍精品| 国产精品色哟哟| 国产精品一级片在线观看| 欧美精品一级二级| 亚洲精品成人精品456| a美女胸又www黄视频久久| 精品国产精品一区二区夜夜嗨| 日韩精品免费专区| 欧美日韩精品一区二区三区 | 欧美高清视频不卡网| 一区二区三区日韩| 99视频一区二区三区| 国产网红主播福利一区二区| 国产精品自拍网站| 26uuu精品一区二区| 久久99蜜桃精品| 欧美大度的电影原声| 久色婷婷小香蕉久久| 日韩三级视频在线观看| 美国毛片一区二区| 日韩欧美不卡在线观看视频| 日韩av不卡在线观看| 777午夜精品视频在线播放| 亚洲444eee在线观看| 欧美在线免费观看视频| 一区二区三区四区av| 欧美艳星brazzers| 亚洲成人一区二区在线观看| 欧美网站大全在线观看| 婷婷开心激情综合| 日韩欧美一区在线观看| 国产一区二区三区四区五区入口 | 亚洲成人动漫一区| 欧美一区二区三区四区视频| 免费在线成人网| 久久综合久久综合亚洲| 懂色一区二区三区免费观看| 中文字幕第一区综合| 色综合色综合色综合色综合色综合 | 91免费在线视频观看| 亚洲人精品午夜| 欧美日韩在线播放| 久久国产婷婷国产香蕉| 日本一区二区三区四区在线视频| 99在线热播精品免费| 亚洲成人黄色影院| 久久久国产午夜精品| 97精品久久久久中文字幕| 亚洲午夜久久久久久久久久久| 欧美妇女性影城| 国产精品91一区二区| 玉米视频成人免费看|