我现在做一个参数化画图的小程序,我以前做的都是通过对话框往图输入数字,比如比例系数
我现在想往图里边输入字符,我想知道是应该怎么做啊,
我以前是这么做的,比如说B吧
dcl对话框里是
:edit_box{
label="B:";
key="B";
edit_width=7;
}
程序里面的接受函数是
我是先定义
static void CALLB Hello_accept(ads_callback_packet *cpkt);
ads_real B;
……
<对话框调用函数>
……
static void CALLB Hello_accept(ads_callback_packet *cpkt)//接受函数
{
char val[MAX_TILE_STR+1];
ads_get_tile(cpkt->dialog, "B", val, MAX_TILE_STR);
acdbDisToF(val,-1,&B);
ads_done_dialog(cpkt->dialog,DLGOK);
return ;}
我要是想计算的话,就可以直接用B了,
但是我想要在cad中输出B
我是这么做的
void Dimchinese(ads_point pt,char *p)//文字标注函数
acedCommand(RTSTR,"STYLE",RTSTR,"ZHC1",RTSTR,"·ÂËÎ_GB2312",RTSTR,"5",
RTSTR,"0.6",RTSTR,"0",RTSTR,"N",RTSTR,"N",0);
acedCommand(RTSTR,"TEXT",RTSTR,"J",RTSTR,"C",RTPOINT,pt,
RTSTR,"0",RTSTR,p,0);
acedCommand(RTSTR,"STYLE",RTSTR,"standard",RTSTR,"",RTSTR,"",
RTSTR,"",RTSTR,"",RTSTR,"N",RTSTR,"N",RTSTR,"N",0);
pp[X]=66;
pp[Y]=666;
acdbRToS(B,-1,-1,mm);
Dimchinese1(pp, B);
我现在遇到到问题是,我想在对话框里输入字符,我想知道接受函数怎么写,我用文字标注函数就能得到我输入的字符串。
|