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

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

?? ch16.htm

?? VisualC21天自學教程.rar 英文經(jīng)典教程
?? 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一区二区三区免费野_久草精品视频
www一区二区| 国产精品一区在线观看你懂的| 日韩中文字幕区一区有砖一区| 国产精品一区三区| 欧美日韩成人综合天天影院| 久久久久久99久久久精品网站| 亚洲福利国产精品| 国产不卡高清在线观看视频| 3d动漫精品啪啪一区二区竹菊| 国产精品乱人伦中文| 激情文学综合网| 在线免费亚洲电影| 最近中文字幕一区二区三区| 国产精品原创巨作av| 日韩欧美一区中文| 亚洲成人精品一区| 欧美系列在线观看| 国产精品麻豆一区二区| 国产一区视频在线看| 欧美一卡二卡在线观看| 五月天丁香久久| 色999日韩国产欧美一区二区| 国产女人水真多18毛片18精品视频| 秋霞午夜鲁丝一区二区老狼| 欧美日韩国产首页在线观看| 亚洲人快播电影网| 91无套直看片红桃| 亚洲丝袜制服诱惑| 色综合视频一区二区三区高清| 欧美极品少妇xxxxⅹ高跟鞋| 国产精品亚洲一区二区三区妖精 | 国产一区二区不卡| 日韩欧美国产三级电影视频| 日本成人在线看| 5566中文字幕一区二区电影| 午夜精品一区二区三区免费视频| 欧美中文字幕一二三区视频| 亚洲成人动漫一区| 678五月天丁香亚洲综合网| 午夜精品久久久久久久99樱桃| 欧美三级资源在线| 热久久一区二区| 亚洲精品在线免费播放| 国产一区二区美女诱惑| 欧美激情一区二区三区蜜桃视频| 成人一区二区在线观看| 中文字幕一区二区三| 欧美色综合久久| 免费成人av资源网| 欧美激情一区二区| 91福利在线免费观看| 亚洲va中文字幕| 日韩欧美一级二级三级| 国产成人在线观看免费网站| 亚洲欧洲综合另类| 欧美夫妻性生活| 国产美女视频91| 亚洲精品免费一二三区| 日韩午夜精品视频| 成人av电影免费观看| 亚洲夂夂婷婷色拍ww47| 欧美大片在线观看| 99久久免费国产| 日韩影视精彩在线| 国产精品美女久久久久久久| 欧美三级视频在线观看| 免费观看在线色综合| 国产精品美日韩| 欧美日韩黄视频| 国产乱码精品1区2区3区| 亚洲女爱视频在线| 精品免费国产二区三区| 99久久免费国产| 蜜桃视频免费观看一区| 亚洲天堂a在线| 精品国产麻豆免费人成网站| 99国产精品久久久| 久久99久久精品| 艳妇臀荡乳欲伦亚洲一区| 精品久久国产老人久久综合| 一本到不卡精品视频在线观看| 久久精品国产久精国产爱| 天堂精品中文字幕在线| 国产欧美精品日韩区二区麻豆天美| 色婷婷久久久亚洲一区二区三区| 韩国成人精品a∨在线观看| 亚洲一区在线观看免费| 国产精品视频九色porn| 精品日韩欧美一区二区| 欧美在线免费播放| 99热这里都是精品| 国产高清久久久| 美腿丝袜在线亚洲一区| 亚洲欧美日韩中文播放| 国产日本亚洲高清| 精品国产成人在线影院 | 亚洲电影第三页| 国产精品视频在线看| 精品久久久三级丝袜| 欧美久久一二区| 欧美曰成人黄网| 日本精品裸体写真集在线观看| 久久 天天综合| 日本三级韩国三级欧美三级| 一区二区三区在线播放| 国产精品欧美一区二区三区| 久久综合久久鬼色中文字| 7777精品伊人久久久大香线蕉 | 欧美日韩午夜在线| 一本大道久久精品懂色aⅴ| 成人精品视频一区二区三区尤物| 国产在线视频精品一区| 国内外成人在线视频| 久久电影国产免费久久电影| 奇米影视一区二区三区| 日本在线不卡一区| 全部av―极品视觉盛宴亚洲| 日本成人在线电影网| 视频一区欧美日韩| 强制捆绑调教一区二区| 久久99国产精品麻豆| 国产揄拍国内精品对白| 狠狠色综合日日| 丁香一区二区三区| av电影天堂一区二区在线| 成人av一区二区三区| 色婷婷激情综合| 在线播放日韩导航| 日韩美女视频在线| 久久九九久精品国产免费直播| 久久久亚洲综合| 中文字幕中文在线不卡住| 一区二区三区精品在线观看| 亚洲国产一二三| 男女男精品网站| 国产美女视频91| 91免费国产在线观看| 欧美日韩国产免费一区二区| 日韩一级免费观看| 国产日本亚洲高清| 亚洲曰韩产成在线| 国内成+人亚洲+欧美+综合在线| 国产精品资源网站| 色av成人天堂桃色av| 欧美理论片在线| 久久亚洲二区三区| 有坂深雪av一区二区精品| 三级在线观看一区二区| 国产电影精品久久禁18| 色偷偷久久人人79超碰人人澡| 欧美日韩成人综合在线一区二区| 日韩精品一区二区三区视频| 国产精品久久久久9999吃药| 亚洲电影在线播放| 国产一区二区三区精品欧美日韩一区二区三区 | 久久久久久免费| 一区二区三区产品免费精品久久75| 男人操女人的视频在线观看欧美| 国产成人av网站| 欧美日韩不卡在线| 国产精品卡一卡二卡三| 毛片不卡一区二区| 97超碰欧美中文字幕| 日韩精品中文字幕在线一区| 综合分类小说区另类春色亚洲小说欧美| 午夜一区二区三区在线观看| 国产成人在线观看| 欧美一级午夜免费电影| 亚洲欧洲日韩在线| 国产一区二区三区| 欧美日本不卡视频| 综合激情网...| 国产在线日韩欧美| 欧美日韩色综合| 亚洲女人的天堂| av亚洲产国偷v产偷v自拍| 欧美成人精品1314www| 亚洲一区二区欧美激情| 99精品欧美一区二区蜜桃免费| 欧美成人女星排行榜| 午夜一区二区三区视频| 91蜜桃传媒精品久久久一区二区| 精品国产伦一区二区三区观看方式| 亚洲一区二区三区小说| av在线这里只有精品| 中文字幕精品—区二区四季| 精品一区二区三区免费毛片爱| 欧美精品视频www在线观看| 亚洲免费色视频| 99久久精品国产导航| 国产午夜精品福利| 国产一二三精品| 欧美xxxx在线观看| 美腿丝袜亚洲一区| 欧美一二三四区在线| 天堂一区二区在线| 4hu四虎永久在线影院成人| 偷拍一区二区三区四区| 欧美男同性恋视频网站| 性感美女久久精品|