C ++ types: Win32, MFC, ATL, and CLR

Source: Internet
Author: User

In terms of the programming hierarchy,Win32Is the bottom layer,SecondMFC.ThenATLAnd finallyCLR.

1.Win32Normally, it is unnecessary.MFC, UseAPIFunction CodeProgram; Win32 winapi can be called;

1) Win32 Application

2) Win32 console application

3) Win32 dynamic-Link Library

4) Win32 static library

 

2. MFC ( Microsoft Foundation Classes: Basic Microsoft class library ) The database has a history of many years, MFC Is based on Windows API . Its core architecture is based on "Document/View" Architecture ( 20 Years ago, it was considered a very trendy concept) and message flow mechanism. This library since Vc6It hasn't changed much since now. MFC The encapsulation scope includes Gui , Io , Databases, network programming, and so on. However, many systems are required for development. API Are not encapsulated, so developers generally MFC You can handle business-related tasks on your own. In fact, many people use MFC Only use its Gui Partial encapsulation. This library Gui The processing efficiency is not very high, sometimes UI Process relatedCodeIt accounts for half or more of the entire project. In general, this is an old database. 10 In addition MFCNo major improvements or updates were made in addition to repairs and supplements. If you ask MFC How long will it last? Well, this is a problem. If one day MFC No, at this level, Microsoft does not have other products to replace it; you can call the MFC class library;

1) MFC Appwizard (exe)

2) MFC Appwizard (DLL)

3) MFC ActiveX controlwizard

 

3. ATL, an Active Template Library, is a Microsoft library that supports ASP code and other ActiveX programs written in C ++. Through the Active Template Library, you can create COM components and then call COM objects through scripts on the ASP page. This COM component can contain controls such as property pages and dialogs. The ATL library looks very old, at least it exists when I access VC . This library can be traced back to the com component, the purpose of ATL is to help developers better interact with com . When do I have com for this item? I don't know either. I only know that com has a 16 bit version, when Windows is upgraded to 32 bits, com is also upgraded to 32 bit. com is like some encapsulated class objects. By encapsulating the system's API , you can use some standard methods. Therefore, if there are any components in the system, you can use the ATL method . Therefore, ATL can not only write ActiveX , but also window or others. Sometimes some functions released by Microsoft are only released in the form of com components, such as MSXML , in this case, MFC is not suitable. It must be handled by ATL . However, ATL is not very strong in processing UI , therefore, Microsoft engineers have an open-source UI framework called wtl for processing UI . the disadvantage of the ATL library is that, as a template library, it will be troublesome when an error occurs. If an error occurs, it will prompt that the library is not confused. You can call the COM object;

1) executable file (exe)
2) dynamic link library (DLL)
3) Service (exe)

 

4. CLR The library follows . NET Framework 2.0 The core implementation and C # , VB.net Same. All are based on the public Language Runtime Library. . NET Framework Encapsulated by a large number of systems API In the form of a class library. C ++ In CLRThe library can use the parts related to the local code. Currently C ++ Not involved yet Asp.net . CLR Library C ++ Revolutionizing many standards C ++ Or even, C ++ No C ++ , Just dressed C ++ To do other things. Here C ++ More like C # Or a similar language. So this is not called C ++ And is called C ++/CLI , It is worth mentioning that C ++/CLI Is not yet standard C ++ Accept. Recently, Microsoft C ++/CLI Standardized proposal C ++ The Standardization Committee refused. So C ++/CLI It is still Microsoft's statement.

In terms of the programming hierarchy,Win32Is the bottom layer,SecondMFC.ThenATLAnd finallyCLR.

1.Win32Normally, it is unnecessary.MFC, UseAPIFunction programming program; Win32 winapi can be called;

1) Win32 Application

2) Win32 console application

3) Win32 dynamic-Link Library

4) Win32 static library

 

2. MFC ( Microsoft Foundation Classes: Basic Microsoft class library ) The database has a history of many years, MFC Is based on Windows API . Its core architecture is based on "Document/View" Architecture ( 20 Years ago, it was considered a very trendy concept) and message flow mechanism. This library since Vc6 It hasn't changed much since now. MFC The encapsulation scope includes Gui , Io , Databases, network programming, and so on. However, many systems are required for development. API Are not encapsulated, so developers generally MFC You can handle business-related tasks on your own. In fact, many people use MFC Only use its Gui Partial encapsulation. This library Gui The processing efficiency is not very high, sometimes UI Code processing accounts for half or more of the entire project. In general, this is an old database. 10 In addition MFC No major improvements or updates were made in addition to repairs and supplements. If you ask MFC How long will it last? Well, this is a problem. If one day MFC No, at this level, Microsoft does not have other products to replace it; you can call the MFC class library;

1) MFC Appwizard (exe)

2) MFC Appwizard (DLL)

3) MFC ActiveX controlwizard

 

3. ATL, an Active Template Library, is a Microsoft library that supports ASP code and other ActiveX programs written in C ++. Through the Active Template Library, you can create COM components and then call COM objects through scripts on the ASP page. This COM component can contain controls such as property pages and dialogs. The ATL library looks very old, at least it exists when I access VC . This library can be traced back to the com component, the purpose of ATL is to help developers better interact with com . When do I have com for this item? I don't know either. I only know that com has a 16 bit version, when Windows is upgraded to 32 bits, com is also upgraded to 32 bit. com is like some encapsulated class objects. By encapsulating the system's API , you can use some standard methods. Therefore, if there are any components in the system, you can use the ATL method . Therefore, ATL can not only write ActiveX , but also window or others. Sometimes some functions released by Microsoft are only released in the form of com components, such as MSXML , in this case, MFC is not suitable. It must be handled by ATL . However, ATL is not very strong in processing UI , therefore, Microsoft engineers have an open-source UI framework called wtl for processing UI . the disadvantage of the ATL library is that, as a template library, it will be troublesome when an error occurs. If an error occurs, it will prompt that the library is not confused. You can call the COM object;

1) executable file (exe)
2) dynamic link library (DLL)
3) Service (exe)

 

4. CLR The library follows . NET Framework 2.0 The core implementation and C # , VB.net Same. All are based on the public Language Runtime Library. . NET Framework Encapsulated by a large number of systems API In the form of a class library. C ++ In CLRThe library can use the parts related to the local code. Currently C ++ Not involved yet Asp.net . CLR Library C ++ Revolutionizing many standards C ++ Or even, C ++ No C ++ , Just dressed C ++ To do other things. Here C ++ More like C # Or a similar language. So this is not called C ++ And is called C ++/CLI , It is worth mentioning that C ++/CLI Is not yet standard C ++ Accept. Recently, Microsoft C ++/CLI Standardized proposal C ++ The Standardization Committee refused. So C ++/CLI It is still Microsoft's statement.

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.