思路: 想创建一个DLL,包含一个输出函数,函数的作用是用来显示一个对话框。
步骤:
1. 创建一个MFC的DLL,写一个输出函数 like: void __declspec(dllexport) MyFunction()
2.创建一个CDialog的类
切记:一定要在你的输出函数中第一句语句中加上
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
否则在调用的时候会出现以下的错误提示:
Debug Assertion Failed!
Program:C:/WINDOWS/system32/notepad.exe
File:f:/rtm/vctools/vs7libs/ship/atlmfc/include/afxwin1.inl
Line:24
For information on how your program can cause an assertion
failure, seee the Visual C++ documentation on asserts.
(Press Retry to debug the application)
3.开始写消息响应函数, do 吧~~!