- UID
- 341
- 积分
- 1118
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-11
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
做了一个简单的arx 使用了arx向导做了一个闪屏的功能,然后就不能卸载arx 了 不知道arx在哪里被锁定了?
- HINSTANCE _hdllInstance =NULL ;
-
- HICON tmg_acadicon;
- // This command registers an ARX command.
- void AddCommand(const char* cmdGroup, const char* cmdInt, const char* cmdLoc,
- const int cmdFlags, const AcRxFunctionPtr cmdProc, const int idLocal = -1);
- // NOTE: DO NOT edit the following lines.
- //{{AFX_ARX_MSG
- void InitApplication();
- void UnloadApplication();
- //}}AFX_ARX_MSG
- // NOTE: DO NOT edit the following lines.
- //{{AFX_ARX_ADDIN_FUNCS
- //}}AFX_ARX_ADDIN_FUNCS
- ////////////////////////////////////////////////////////////////////////////
- //
- // Define the sole extension module object.
- AC_IMPLEMENT_EXTENSION_MODULE(TmInitDLL);
- // Now you can use the CAcModuleResourceOverride class in
- // your application to switch to the correct resource instance.
- // Please see the ObjectARX Documentation for more details
- /////////////////////////////////////////////////////////////////////////////
- // DLL Entry Point
- extern "C"
- BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
- {
- if (dwReason == DLL_PROCESS_ATTACH)
- {
- _hdllInstance = hInstance;
- // Extension DLL one time initialization
- TmInitDLL.AttachInstance(hInstance);
- InitAcUiDLL();
- } else if (dwReason == DLL_PROCESS_DETACH) {
- // Terminate the library before destructors are called
- TmInitDLL.DetachInstance();
- }
- return TRUE; // ok
- }
- /////////////////////////////////////////////////////////////////////////////
- // ObjectARX EntryPoint
- extern "C" AcRx::AppRetCode
- acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)
- {
- switch (msg) {
- case AcRx::kInitAppMsg:
- AfxSetResourceHandle (_hdllInstance) ; //
- CSplashScreen::EnableSplashScreen (TRUE) ;
- CSplashScreen::ShowSplashScreen (acedGetAcadFrame ()) ;
- AfxSetResourceHandle (acedGetAcadResourceInstance ()) ;
- // Comment out the following line if your
- // application should be locked into memory
- acrxDynamicLinker->unlockApplication(pkt);
- acrxDynamicLinker->registerAppMDIAware(pkt);
- InitApplication();
- break;
- case AcRx::kUnloadAppMsg:
- // acrxDynamicLinker->unlockApplication(pkt); //这里也没有解锁 这里显示 在用arx命令卸载这个程序的时候没有执行到这里?
- UnloadApplication();
- break;
- }
- return AcRx::kRetOK;
- }
- // Init this application. Register your
- // commands, reactors...
- void InitApplication()
- {
- // NOTE: DO NOT edit the following lines.
- //{{AFX_ARX_INIT
- AddCommand("TMITSABOUT", "TSABOUT", "TSABOUT", ACRX_CMD_TRANSPARENT | ACRX_CMD_USEPICKSET, tmtsAbout);
- //}}AFX_ARX_INIT
- // TODO: add your initialization functions
- // 更换cad图标
-
- UINT nIDIcon=IDI_ICONHEAD;
- CString strWinText;
- oxaSetFrameIcon(nIDIcon, strWinText);
-
- }
- // Unload this application. Unregister all objects
- // registered in InitApplication.
- void UnloadApplication()
- {
- // NOTE: DO NOT edit the following lines.
- //{{AFX_ARX_EXIT
- acedRegCmds->removeGroup("TMITSABOUT");
- //}}AFX_ARX_EXIT
- // TODO: clean up your application
- oxaResetFrameIcon(tmg_acadicon);
- }
- // This functions registers an ARX command.
- // It can be used to read the localized command name
- // from a string table stored in the resources.
- void AddCommand(const char* cmdGroup, const char* cmdInt, const char* cmdLoc,
- const int cmdFlags, const AcRxFunctionPtr cmdProc, const int idLocal)
- {
- char cmdLocRes[65];
- // If idLocal is not -1, it's treated as an ID for
- // a string stored in the resources.
- if (idLocal != -1) {
- // Load strings from the string table and register the command.
- ::LoadString(_hdllInstance, idLocal, cmdLocRes, 64);
- acedRegCmds->addCommand(cmdGroup, cmdInt, cmdLocRes, cmdFlags, cmdProc);
- } else
- // idLocal is -1, so the 'hard coded'
- // localized function name is used.
- acedRegCmds->addCommand(cmdGroup, cmdInt, cmdLoc, cmdFlags, cmdProc);
- }
|
|