Use the internal implementation of the MFC EXTENSION DLL package interface class

xiaoxiao2021-03-06  118

I used a modification of the CXListCtrl class. In order to encapsulate this internal, I used the MFC Extension DLL mode. Here is my implementation step, programming environment: Win2000 VC6.0

Create a DLL library

First step, create an MFC Extension DLL project

In the second step, add CXListCtrl to the project

Class CXListCtrl in * .h files: public clistctrl

Modify to Class AFX_CLASS_EXPORT CXListCtrl: Public Clistctrl

In the third step, compiling by generating a DLL, lib file

Call the DLL library

1. Put the DLL. Lib file in the calling project directory

2. Add the CXListCtrl.h file in the calling project to the project

Note: Do not require addition AFX_CLASS_EXPORT macro

3, then "Project" -> "Setting" -> "link" -> "object / library module" Add * .lib

4, compilation pass, call success

5, when the program is released, join the DLL file into it, do not need to join the lib file

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

New Post(0)