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

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

?? ch16.htm

?? vc++21天輕輕松松入門
?? HTM
?? 第 1 頁 / 共 2 頁
字號(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一区二区三区免费野_久草精品视频
日韩欧美国产精品| 日韩欧美一区二区在线视频| 看电影不卡的网站| 夜夜夜精品看看| 日韩一区有码在线| 国产亚洲欧美在线| 久久精品男人天堂av| 91麻豆精品国产91久久久久| 欧美三级视频在线观看| 韩国成人福利片在线播放| 免费观看30秒视频久久| 秋霞电影网一区二区| 日韩激情一区二区| 午夜欧美大尺度福利影院在线看 | 欧美一三区三区四区免费在线看| 在线精品视频一区二区| 91免费版在线看| 91麻豆精品一区二区三区| 国产高清不卡一区| 国产成人综合亚洲网站| 国产精品一区二区免费不卡| 激情成人综合网| 国产一区欧美二区| 国产一区二区伦理| 国产一区二区精品久久99| 成人午夜伦理影院| 不卡影院免费观看| 91美女片黄在线观看| 91免费观看视频| 91精品国产福利| 2022国产精品视频| 国产亚洲精品资源在线26u| 国产精品国产三级国产有无不卡| 国产精品国产三级国产三级人妇 | 日韩精品亚洲一区二区三区免费| 亚洲国产一区视频| 日产精品久久久久久久性色| 国产一区二区三区黄视频| 豆国产96在线|亚洲| 99精品在线观看视频| 在线国产电影不卡| 精品国产露脸精彩对白| 欧美激情一区二区三区四区| 亚洲欧美日韩电影| 樱花草国产18久久久久| 久久91精品国产91久久小草| 国产精品一区二区三区四区| 成人av第一页| 成人综合婷婷国产精品久久蜜臀| 91亚洲精华国产精华精华液| 在线精品观看国产| 欧美日韩国产123区| 日韩欧美一级精品久久| 欧美精品一区二| 日韩毛片在线免费观看| 亚洲欧美韩国综合色| 免费在线欧美视频| 国产精品99久久久久久似苏梦涵| 一本大道久久精品懂色aⅴ| 日韩精品自拍偷拍| 中文字幕一区二区三区视频| 亚洲成人综合网站| 青草av.久久免费一区| 99视频精品免费视频| 欧美丰满美乳xxx高潮www| 国产日韩欧美精品电影三级在线| 亚洲成av人影院| 国产69精品久久99不卡| 欧美专区在线观看一区| 欧美猛男超大videosgay| 欧美激情自拍偷拍| 天堂va蜜桃一区二区三区 | 精品成人一区二区| 亚洲欧美日韩国产成人精品影院| 久久电影网站中文字幕| 国产成人在线视频免费播放| 欧美三级资源在线| 亚洲国产精品成人综合| 石原莉奈在线亚洲二区| 91美女在线看| 久久精品夜夜夜夜久久| 亚洲va天堂va国产va久| 激情综合色综合久久| 777午夜精品免费视频| 1024国产精品| 精品一区二区三区在线播放| 欧美日韩极品在线观看一区| 中文字幕一区二区三区在线不卡| 精品一区二区三区在线播放视频| 欧美色涩在线第一页| 亚洲蜜臀av乱码久久精品| 国产精品综合视频| 91精品国产综合久久久久 | 成人黄色在线视频| 日韩欧美在线一区二区三区| 樱花影视一区二区| 99在线精品一区二区三区| 久久久噜噜噜久久人人看| 三级精品在线观看| 日本精品一区二区三区高清 | 日韩欧美国产一区在线观看| 一区二区在线电影| 91网页版在线| 中文久久乱码一区二区| 国产一区日韩二区欧美三区| 日韩欧美资源站| 亚洲444eee在线观看| 欧美综合在线视频| 亚洲色图第一区| 波多野结衣91| 亚洲免费视频中文字幕| 成人免费看的视频| 国产拍欧美日韩视频二区| 日韩成人午夜电影| 日韩精品在线看片z| 麻豆成人综合网| 日韩欧美一区二区三区在线| 偷拍与自拍一区| 欧美一区二区在线不卡| 午夜精品一区二区三区三上悠亚| 在线亚洲精品福利网址导航| 五月天久久比比资源色| 欧美日韩一区在线观看| 亚洲一级二级在线| 色美美综合视频| 婷婷激情综合网| 日韩一区二区精品在线观看| 青青草精品视频| 欧美日韩精品福利| 国产真实乱对白精彩久久| 久久蜜桃一区二区| 高清shemale亚洲人妖| 国产精品日韩精品欧美在线| 欧美性猛交一区二区三区精品 | 一本到不卡精品视频在线观看| 亚洲午夜激情网页| 欧美精品一区二区三区在线| 成人av资源在线| 午夜激情一区二区| 久久伊人中文字幕| 91一区二区三区在线观看| 天堂av在线一区| 国产日韩精品一区二区浪潮av | 日韩免费看的电影| 成人av动漫网站| 日韩国产高清影视| 国产精品久久久久久福利一牛影视| 欧美色爱综合网| 国产精品一区在线| 亚洲123区在线观看| 国产亚洲精品资源在线26u| 欧美综合久久久| 国产精品99久久久久久似苏梦涵 | 国产精品国产自产拍高清av| 欧美日韩免费一区二区三区 | 日韩午夜电影在线观看| caoporm超碰国产精品| 日韩黄色免费网站| 一区二区中文字幕在线| 欧美tickling挠脚心丨vk| 日本高清不卡aⅴ免费网站| 国内一区二区在线| 亚洲午夜私人影院| 国产欧美视频在线观看| 91精品国产综合久久小美女 | 亚洲色图在线看| 久久先锋影音av鲁色资源网| 欧美日本一区二区| 91亚洲精品一区二区乱码| 国产伦精品一区二区三区免费迷| 亚洲制服丝袜av| 综合欧美一区二区三区| 久久久高清一区二区三区| 欧美一区二区三区婷婷月色| 在线观看成人免费视频| 成a人片国产精品| 国产高清视频一区| 免费av成人在线| 亚洲国产aⅴ天堂久久| 中文字幕中文字幕在线一区 | 久久精品视频网| 91精品国产麻豆国产自产在线| 91美女片黄在线观看91美女| 成人久久18免费网站麻豆 | 一本大道久久精品懂色aⅴ| 国产a级毛片一区| 精品中文字幕一区二区| 亚洲国产cao| 亚洲一区中文日韩| 亚洲国产欧美另类丝袜| 99久久久久免费精品国产| 久久国产精品99久久久久久老狼| 亚洲精品日韩综合观看成人91| 日本一区二区成人在线| 国产亚洲精品福利| 精品va天堂亚洲国产| 日韩欧美高清dvd碟片| 日韩一级片网站| 欧美成人精品1314www| 制服丝袜中文字幕一区|