Use auxiliary class in the SDK program

zhaozj2021-02-16  49

Using the secondary class in the MFC in the SDK program, it is very convenient to use the API to complete the corresponding work, if you use the API to complete a lot of repetition, use the MFC. Auxiliary class saves a lot of development time, the specific method is as follows:

1. Add the corresponding header file

Since it is necessary to include Windows.h header files in the SDK program, when using the class in the MFC, if there is a prompt to conflict with Windows.h, the solution is to remove Windows.h, then join before all .h files

#include "stdafx.h" #include // mfc core and standard components # include // mfc extensions # include // mfc Automation Classes # include // MFC Support for Internet Explorer 4 Common Controls

#include

Note Be sure to join these lines before all headers, and the order is best not to change, otherwise there will be a lot of error prompts.

2. Change compilation settings

In Project-> Setting-> General Selected Use of Use MFC in A Shared DLL or Use MFC in Static Library and use the use runing-time library in Project-> Setting-> C / C by Single-Threaded to the corresponding multithreaded

转载请注明原文地址:https://www.9cbs.com/read-27362.html

New Post(0)