Brief analysis of the difference between SDK and MFC in VC

  • 2020-04-02 02:31:30
  • OfStack

This paper analyzes the difference between SDK and MFC in vc, which has certain reference value for friends who are just learning vc. The details are as follows:

SDK refers to the Software Development Kit

MFC refers to the Microsoft Foundation Classes Microsoft functional class library

Therefore, MFC is the encapsulation of API functions, which is also the SDK in vc
 
There are two ways to write Windows programs with VC: 1. Windwos c (SDK), 2.C++ : that is, packaging SDK functions, such as VC's MFC,BCB's OWL, etc.

SDK programming is a direct call to the Windows API for programming, usually people often say that "write programs with SDK" means to use the Windows API function to write procedures, API by thousands of API functions (Win95 API has more than 2,000). MFC is a closed API, combined with object-oriented programming inheritance and polymorphism to form a "class", a total of more than 100 classes.

Although MFC is more convenient than SDK, it is not a wise choice to go deep into VC and learn MFC directly. Only when you are familiar with the operation mechanism of MFC can you go further. so VC is best to learn to use SDK programming, during this period of in-depth understanding of the working principle of Windows operating system and the application of various API functions, and then in-depth MFC .

The SDK is based on C, while MFC is based on C++, which is the fundamental difference. MFC mainly encapsulates the interface, files, WinInet and thread functions. In addition to the encapsulated API, the most important aspect of MFC is its architecture. The Doc/View structure it USES is not available in the SDK, and this architecture is relatively special. Although the Doc/View structure was not invented by Microsoft, it is a feature of MFC. Microsoft developed Windows using C, so the SDK was not originally designed with C++ in mind.


Related articles: