Comparison between the MFC ActiveX Control and the ATL ActiveX control.

Source: Internet
Author: User

1. Both of them can use Appwizard in vs ide To establish the framework. The former uses "MFC ActiveX Control wizard", and the latter uses "atl com Appwizard ".

2. The default extension of ActiveX controls created with MFC is ". ocx", and that of ActiveX controls created with ATL (Active Template Library) is ". dll ".

3. It is much easier to use MFC to create ActiveX controls, because it saves the trouble of chatting about many low-level com concepts, and multiple MFC classes can be used in the control design, such as cstring, cwnd, and CDC; creating ActiveX controls with ATL is more complex, and only Windows SDK (win api) functions can be used.

4. the MFC ActiveX control file is smaller than that of ATL, but the DLL support of MFC is required, and the DLL (about K) of MFC is much larger than that of ATL (about 20 K.

5. There are many materials and books about how to use MFC to design ActiveX controls, and there are also many examples. However, there are not many books on ATL ActiveX design, for specific examples, see Chapter 6.0 of "Visual C ++ 21st development User Manual" and Chapter 11th of "Visual C ++ practice and improvement-ActiveX.

6. For ease of design, similar to MFC, ATL also has many c ++ template l classes (non-MFC classes). cwindow is the parent class of all window classes in the ATL template class. For details about the ATL template class and the member functions of common classes (also known as "methods"), see Chapter 10th "Visual C ++ practice and improvement-ActiveX.

 

 

 

From: http://blog.csdn.net/caiqi1123/article/details/6960029

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.