马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
问题:
I have registered my ARX application using MFC to be demand loaded during
AutoCAD startup. My ARX application loads but the AutoCAD menu does not display
anymore. If I use MFC, why does everything work correctly?
解答:
This is caused because the following line in the 'InitModule()' function of your
ARX application is missing:
new CDynLinkLibrary (arxmfcDLL) ;
Here is the minimum InitModule() function you have to implement:
 - static AFX_EXTENSION_MODULE arxmfcDLL ;
- extern BOOL InitModule (HINSTANCE hInstance, DWORD dwReason, LPVOID) {
- if ( dwReason == DLL_PROCESS_ATTACH ) {
- if ( !AfxInitExtensionModule (arxmfcDLL, hInstance) )
- return (0) ;
- new CDynLinkLibrary (arxmfcDLL) ;
- } else if ( dwReason == DLL_PROCESS_DETACH ) {
- AfxTermExtensionModule (arxmfcDLL) ;
- }
- return (1) ;
- }
|