- UID
- 119490
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2004-3-31
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
#include <aced.h>
#include <rxregsvc.h>
#include <acedads.h>
#include <adscodes.h>
#include <adsdef.h>
#define x 0
#define y 1
#define z 2
void initApp();
void unloadApp();
void user_app();
int dragsample();
void ident_init();
void initApp()
{
acedRegCmds->addCommand("User_COMMANDS","c11","c11",
ACRX_CMD_TRANSPARENT,user_app);
}
void unloadApp()
{
acedRegCmds->removeGroup("User_COMMANDS");
}
extern "C" AcRx::AppRetCode
acrxEntryPoint(AcRx::AppMsgCode msg,void* pkt)
{
switch (msg)
{
case AcRx::kInitAppMsg:
acrxDynamicLinker->unlockApplication(pkt);
acrxRegisterAppMDIAware(pkt);
initApp();
break;
case AcRx::kUnloadAppMsg:
unloadApp();
break;
default:
break;
}
return AcRx::kRetOK;
}
void user_app()
{
int rc;
ads_name ssname;
ads_point return_pt;
ads_matrix matrix0;
if(acedSSGet(NULL,NULL,NULL,NULL,ssname) ==RTNORM){
rc=acedDragGen(
ssname,
"Scale the selected objects by dragging",
0,
dragsample,
return_pt);//第54行 这行出错
if(rc==RTNORM){
ident_init(matrix0);//第56行这行出错
matrix0[0][0]=return_pt[x];
matrix0[1][1]=return_pt[x];
matrix0[2][2]=return_pt[x];
rc = acedXformSS(ssname,matrix0);
if(rc == RTNORM)acutPrintf("\n The scale opration is OK.");
}
}
}
void ident_init(ads_matrix id)
{
int i,j;
for (i=0;i<=3;i++)
for (j=0;j<=3;j++)
id[j]=0.0;
}
int dragsample(ads_point usrpt,ads_matrix matrix)
{
ident_init(matrix);
matrix[0][0]=matrix[1][1]=usrpt[X];
return RTNORM;
}
库文件
rxapi.lib acrx15.lib acutil15.lib acedapi.lib acad.lib
错误
D:\project\matri\matri.cpp(54) : error C2664: 'acedDragGen' : cannot convert parameter 4 from 'int (void)' to 'int (__cdecl *)(double [],double [][4])'
None of the functions with this name in scope match the target type
D:\project\matri\matri.cpp(56) : error C2660: 'ident_init' : function does not take 1 parameters
Error executing cl.exe. |
|