[求助]请高手帮忙!!关于ObjectARX对MDT6.0的二次开发!
这一大堆程序是什么意思啊,有什么用呀,请高手指教,本人为了毕业设计,才认识ObjectARX,所以不了解,也是最近才开始学的!#include "StdAfx.h"<BR>#include "StdArx.h"<BR>#include "resource.h"
HINSTANCE _hdllInstance =NULL ;
// This command registers an ARX command.<BR>void AddCommand(const char* cmdGroup, const char* cmdInt, const char* cmdLoc,<BR> const int cmdFlags, const AcRxFunctionPtr cmdProc, const int idLocal = -1);
<BR>// NOTE: DO NOT edit the following lines.<BR>//{{AFX_ARX_MSG<BR>void InitApplication();<BR>void UnloadApplication();<BR>//}}AFX_ARX_MSG
// NOTE: DO NOT edit the following lines.<BR>//{{AFX_ARX_ADDIN_FUNCS<BR>//}}AFX_ARX_ADDIN_FUNCS
<BR>/////////////////////////////////////////////////////////////////////////////<BR>// DLL Entry Point<BR>extern "C"<BR>BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)<BR>{<BR> if (dwReason == DLL_PROCESS_ATTACH)<BR> {<BR> _hdllInstance = hInstance;<BR> } else if (dwReason == DLL_PROCESS_DETACH) {
}<BR> return TRUE; // ok<BR>}
/////////////////////////////////////////////////////////////////////////////<BR>// ObjectARX EntryPoint<BR>extern "C" AcRx::AppRetCode <BR>acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)<BR>{<BR> switch (msg) {<BR> case AcRx::kInitAppMsg:<BR> // Comment out the following line if your<BR> // application should be locked into memory<BR> acrxDynamicLinker->unlockApplication(pkt);<BR> acrxDynamicLinker->registerAppMDIAware(pkt);<BR> InitApplication();<BR> break;<BR> case AcRx::kUnloadAppMsg:<BR> UnloadApplication();<BR> break;<BR> }<BR> return AcRx::kRetOK;<BR>}
// Init this application. Register your<BR>// commands, reactors...<BR>void InitApplication()<BR>{<BR> // NOTE: DO NOT edit the following lines.<BR> //{{AFX_ARX_INIT<BR> AddCommand("JACKILIN", "TEST", "TEST", ACRX_CMD_TRANSPARENT | ACRX_CMD_USEPICKSET, Jackilintest);<BR> //}}AFX_ARX_INIT
// TODO: add your initialization functions
}
// Unload this application. Unregister all objects<BR>// registered in InitApplication.<BR>void UnloadApplication()<BR>{<BR> // NOTE: DO NOT edit the following lines.<BR> //{{AFX_ARX_EXIT<BR> acedRegCmds->removeGroup("JACKILIN");<BR> //}}AFX_ARX_EXIT
// TODO: clean up your application<BR>}
// This functions registers an ARX command.<BR>// It can be used to read the localized command name<BR>// from a string table stored in the resources.<BR>void AddCommand(const char* cmdGroup, const char* cmdInt, const char* cmdLoc,<BR> const int cmdFlags, const AcRxFunctionPtr cmdProc, const int idLocal)<BR>{<BR> char cmdLocRes;
// If idLocal is not -1, it's treated as an ID for<BR> // a string stored in the resources.<BR> if (idLocal != -1) {
// Load strings from the string table and register the command.<BR> ::LoadString(_hdllInstance, idLocal, cmdLocRes, 64);<BR> acedRegCmds->addCommand(cmdGroup, cmdInt, cmdLocRes, cmdFlags, cmdProc);
} else<BR> // idLocal is -1, so the 'hard coded'<BR> // localized function name is used.<BR> acedRegCmds->addCommand(cmdGroup, cmdInt, cmdLoc, cmdFlags, cmdProc);<BR>}<BR>
页:
[1]