|
发表于 2005-2-15 23:23:00
|
显示全部楼层
可能你的程序中该命令没有正确注册?
#include "stdafx.h"
#include
#include
void initApp();
void unloadApp();
void helloWorld();
void initApp()
{
[B]
// register a command with the AutoCAD command mechanism
acedRegCmds->addCommand("HELLOWORLD_COMMANDS",
"Hello",
"Bonjour",
ACRX_CMD_TRANSPARENT,
helloWorld);[/B]
}
void helloWorld()
{
[B]
acutPrintf("\nHello World!");[/B]
} extern "C" AcRx::AppRetCode
acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)
{
[B]
switch (msg)
{
[B]
case AcRx::kInitAppMsg:
acrxDynamicLinker->unlockApplication(pkt);
acrxRegisterAppMDIAware(pkt);
initApp();
break;
case AcRx::kUnloadAppMsg:
unloadApp();
break;
default:
break;
[/B]
}
[/B]
return AcRx::kRetOK;
} |
|