[求助]关于注册命令函数的问题
www.dimcax.com
[求助]关于注册命令函数的问题
看了看sdk 中的例子(helloword)编译了一下感觉不错,可惜不是自己做的。
翻开书看看才发现原来有很多东西是不用自己手工编写的,比如说头文件、exterm “c”、和注册命令......
建了一个空的arx 工程,用sdk自带的工具生成了以上的东西,命令注册部分详细代码如下:
void initapplication()
addcommand("helloworld_commands", "helloword", "helloword", acrx_cmd_transparent | acrx_cmd_usepickset, arxhellowordhelloword);
void unloadapplication()
{
acedregcmds->removegroup("helloworld_commands");
}
而例子是这样的
void initapp()
{
// register a command with the autocad command mechanism
acedregcmds->addcommand("helloworld_commands",
"hello",
"bonjour",
acrx_cmd_transparent,
helloworld);
}
void unloadapp()
{
acedregcmds->removegroup("helloworld_commands");
}
其他的东西都是大同小异,为什么我的程序没法执行?
对注册命令的函数比较晕,注册一个命令要那么多的名字,这些名字是做什么用的呢?一般的我要自己编写一个操作实体的函数怎么给它注册命令呢?
抱歉发错地方了,虽然这个区迟早都是要进的。