Take you to play the visual studio--take you know VC + + various types of engineering __c++

Source: Internet
Author: User
Tags exception handling object model ole

The previous article takes you to play the visual studio--to take you to create a new project the article mentions that a new project will have a lot of engineering types (Figure 1) and will now briefly describe the meaning and main uses of various types of projects. Because there are too many types of engineering here, there are many I have not contacted, some may understand the less right place also please understand.

First of all, if your beginners or C + + development time is not long, this article a lot of content can not understand is normal (I did not understand). You may have a general idea, such as a job (or actual project development experience) to come back in a year or two before you see it.


Figure 1:new Project

understand a few concepts

Understand a few concepts before you start the lecture, which is the basis for understanding the various engineering implications behind it. COM

The COM Component object Model is a component software standard developed by Microsoft, just like CORBA on Unix. The components developed by following COM standards are called COM components. The purpose is to realize the binary way of software reuse. On the Windows platform, COM is implemented in the form of 2 kinds of DLLs (in-process components) and EXE (Out-of-process components). OLE

OLE (Object Linking and Embedding) object connectivity and embedding is Microsoft's Composite document technology, which facilitates communication between applications. COM was imported in later OLE2, providing support for COM, which enables the development of reusable software component COM. OLE is a kind of technology that the software proposed earlier. ATL

The ATL (Active Template Library) Activity Template Library is a set of C + + template libraries that are commonly used to develop COM programs and ActiveX programs. To understand the ATL technology, you can understand the following two things:
1.ATL can be said to encapsulate the COM, like MFC as a library, and have a wizard to make COM application development as automated and visual as possible, which determines that ATL is only for COM development support.
2.ATL uses a specific basic implementation technology to get rid of a lot of redundant code, and the code for COM applications developed by ATL is concise and efficient.
Before ATL was produced, there were two main ways to develop COM components: one was to develop COM components directly using the COM SDK (COM software development package), and the other way was through COM support provided by MFC. Now ATL has become a major development tool for Microsoft's support for COM application development. MFC

MFC (Microsoft Foundation Classes) Microsoft Foundation Class is a basic class library for Windows program development provided by Microsoft. MFC encapsulates the Windows API as a C + + class and includes an application framework to reduce the workload for application developers. It contains classes that contain a large number of Windows handle encapsulation classes and many of the built-in controls and components of Windows. ActiveX

ActiveX is a set of technologies proposed by Microsoft to use COM technology to enable software components to interact in a networked environment, and it has nothing to do with specific programming languages. As a technology developed for Internet applications, ActiveX is widely used in all aspects of Web servers and clients. At the same time, ActiveX technology is also used to easily create common desktop applications, and ActiveX generally has an interface.

ActiveX includes both server-side technology and client technology. Its main contents are:
1. ActiveX control, which is used to insert COM objects into an ActiveX-enabled container (Container), such as a Web page, Microsoft Word, and so on.
2. ActiveX documentation (ActiveX document); For browsing compound documents (non-HTML documents) in Web browser or other ActiveX-enabled containers, such as Microsoft Word documents, Microsoft Excel documents or user-defined documents, and so on.
3. ActiveX Script description (ActiveX scripting), used to manipulate ActiveX control and Java programs from the client or server side, pass data, and coordinate operations between them.
4. The ActiveX server framework, which provides a range of functions for Web server application design and its encapsulated classes, such as server filters, HTML Data flow control, and so on.
5. Built-in Java Virtual machines (Java Machine) in Internet Explorer to enable Java applets to run on Internet Explorer, and can communicate with ActiveX control through the scripting language. differences between OLE, ActiveX, com

From a time perspective, OLE is the oldest, followed by COM and ActiveX; From an architectural standpoint, OLE and ActiveX are built on COM, so COM is the basis; OLE, ActiveX is a two-brand name from the name point of view, And COM is a pure technical term, which is why we hear more about ActiveX and OLE. Since OLE is the first to appear, so, from Ole's point of view, since the Windows operating system became popular, the Clipboard (Clipboard) First solved the problem of communication between different programs (the Clipboard as a data exchange center, the operation to paste, but the clipboard passed is "dead" data , application developers have to write and parse data format code, so Dynamic Data interchange (EXCHANGE,DDE) communication protocol came into being, it allows applications to automatically obtain each other's latest data, but to solve each other's "Data format" Conversion is still a heavy burden for programmers. The creation of an object's link and embedding (Object linking and Embedded,ole) increases the data exchange of the original application to "object swapping" so that the program not only obtains data but also obtains each other's application objects, and can directly use each other's data content. In fact, OLE is Microsoft's composite document technology, and its original version aims only at compound documents, but in subsequent versions of OLE2, COM is imported. Thus, COM was born to the needs of OLE, so although COM is the base of OLE, OLE is generated before COM. The basic starting point for COM is to have a software service to another software through a common organization. COM was born at the request of OLE, but its first user was OLE2, so there was not much relationship between COM and compound documents, and in fact, COM became a technology that was completely unrelated to the compound document, and it began to be widely used. As a result, Microsoft is beginning to "get into" the common platform technology. But COM is not a product, it needs a brand name. At that time, Microsoft's market experts had chosen OLE as the trademark name, so the use of COM technology began to be labeled OLE, although the vast majority of these technologies are not related to composite documents.
= = This paragraph is reproduced from OLE, ActiveX, COM, ATL contacts and differences = = various engineering structures ATL ATL Project

Create an ATL based project that uses ATL for the development of COM components, and ATL provides a large number of reusable templates. ATL can be used for the development of COM components and for ActiveX development. CLR Class Library CLR Console Application CLR Empty Project Windows Forms Application Windows Forms Control Library

The CLR (Common Language Runtime) is the common language runtime, and is also a run-time environment like a Java virtual machine. The core features of the CLR include: memory management, assembly loading, security, exception handling, and thread synchronization, which can be used by all languages that are oriented to the CLR. and ensure the necessary separation between the application and the underlying operating system. Clr/c++ is a managed C + + program in which data and code are managed by the CLR and the caller does not have to manage the allocation and release of memory, which the CLR appears to be used for. Net.

This piece I really do not understand, will not say, afraid of fraught ... General Empty Project

is to create an empty project without adding any. cpp or. h files, without any special settings. Custom Wizard

is the user-defined wizard, what does that mean? For example, every time you build a new project, you expect the project to have main.cpp, projectDescription.txt two files, and Main.cpp has a default main function. Then you can build a custom wizard project, and make a main.cpp, projectDescription.txt file and directory structure; and then every time you create a new project, you choose it based on this existing Custom Wizard project, The new project will automatically add main.cpp, projectDescription.txt files. Plainly Custom Wizard is a model that defines the project's default file and default configuration. Makefile Project

Makefile is the rules for organizing, building, and compiling files such as. cpp and. H. This is used in cross-platform development, such as the program you developed to compile under Windows and Linux, Mac, generally use the makefile compilation rules. Description: There is a Microsoft's own NMAKE Builder under Windows, because the content in the makefile file in vs. is able to compile successfully with NMAKE rules. MFC MFC ActiveX Control

is to create ActiveX programs in a way that supports MFC, which allows you to quickly develop ActiveX programs with interfaces.
Expand reading "Using VS2010 to create MFC ActiveX Project" MFC Application

This is the project you normally use to develop MFC programs, and MFC (Microsoft Foundation Classes) is a basic class library for Windows program development provided by Microsoft and a way to quickly develop desktop programs on Windows. MFC DLLs

It is also the creation of an MFC program, and MFC application is different: MFC Application project generates an. exe executable file, and the MFC DLL project generates a. dll dynamic library file. Test Test

As the name suggests, this is a test project that can be used for unit testing, sequential testing, stress testing, and so on. Win32 Win32 Console Application

This is your most familiar console application, the compilation succeeds, and a black command-line window appears at run time. The previous article takes you to the visual studio--to take you to a new engineering sample that is the type of project created. Win32 Project

MFC is actually a kind of closure of the Windows API to make it have object-oriented features. This WIN32 project works by using the Windows SDK to develop a program with a window interface by directly invoking the Windows API. Description

In fact, like the general development of common types of engineering are also several:
Win32 Console Application: console application, which is also the common Black Command window.
Win32 Project: Develop Windows desktop applications directly with the Windows API.
MFC Application: MFC project, with Microsoft provided by the class library for the rapid development of interface programs.

Previous review:
Take you to the visual studio--to take you to a new project

What to tell in the next article:
I'll take you to the visual studio--to bring you high efficiency development

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.