- #include "Hello.h"
- #include "windows.h"
- #include
- #include
- void initApp();
- void unloadApp();
- void HelloWorld();
- void initApp()
- {
- //register a command with the 浩辰CAD command mechanism
- acedRegCmds->addCommand(_T("HELLOWORLD_CMDS"), _T("Hello"), _T("Hello"), ACRX_CMD_TRANSPARENT, HelloWorld);
- }
- void unloadApp()
- {
- acedRegCmds->removeGroup(L"HELLOWORLD_CMDS");
- }
- void HelloWorld()
- {
- //print "Hello World" in 浩辰CAD command line
- acutPrintf(_T("\nHello World!"));
- }
- extern "C" AcRx::AppRetCode gcrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)
- {
- switch (msg)
- {
- case AcRx::kInitAppMsg:
- acrxDynamicLinker->unlockApplication(pkt);
- acrxDynamicLinker->registerAppMDIAware(pkt);
- initApp();
- break;
- case AcRx::kUnloadAppMsg:
- unloadApp();
- break;
- default:
- break;
- }
- return AcRx::kRetOK;
- }
|