马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
- static int ads_progress1(void)
- {
- //----- Remove the following line if you do not expect any argument for this ADS function
- struct resbuf *rb =acedGetArgs () ;
- // TODO: add your code here
- if (rb == NULL)
- {
- acdbFail("参数太少");
- acedRetVoid();
- return RTERROR;
- }
- char *str;
- if (rb->restype == RTSTR)
- {
- str = rb->resval.rstring;
- }
- else
- {
- acdbFail("参数错误");
- acedRetVoid();
- return RTERROR;
- }
- rb = rb->rbnext;
- if (rb == NULL)
- {
- acdbFail("参数太少");
- acedRetVoid();
- return RTERROR;
- }
- long maxs,mins;
- if (rb->restype == RTLONG)
- {
- mins = rb->resval.rlong;
- }
- else if(rb->restype == RTSHORT)
- {
- mins = rb->resval.rint;
- }
- else
- {
- acdbFail("参数错误");
- acedRetVoid();
- return RTERROR;
- }
- rb = rb->rbnext;
- if (rb == NULL)
- {
- acdbFail("参数太少");
- acedRetVoid();
- return RTERROR;
- }
- if (rb->restype == RTLONG)
- {
- maxs = rb->resval.rlong;
- }
- else if(rb->restype == RTSHORT)
- {
- maxs = rb->resval.rint;
- }
- else
- {
- acdbFail("参数错误");
- acedRetVoid();
- return RTERROR;
- }
- if (rb->rbnext !=NULL)
- {
- acdbFail("参数太多");
- acedRetVoid();
- return RTERROR;
- }
- acedSetStatusBarProgressMeter(str,mins,maxs);
- acedRetVoid();
- return RTNORM;
- // TODO: Replace the following line by your returned value if any
- acedRetVoid () ;
- return (RSRSLT) ;
- }
- static int ads_progress2(void)
- {
- //----- Remove the following line if you do not expect any argument for this ADS function
- struct resbuf *rb =acedGetArgs () ;
- // TODO: add your code here
- if (rb == NULL)
- {
- acdbFail("参数太少");
- acedRetVoid();
- return RTERROR;
- }
- long maxs,mins;
- if (rb->restype == RTLONG)
- {
- mins = rb->resval.rlong;
- }
- else if(rb->restype == RTSHORT)
- {
- mins = rb->resval.rint;
- }
- else
- {
- acdbFail("参数错误");
- acedRetVoid();
- return RTERROR;
- }
-
- if (rb->rbnext !=NULL)
- {
- acdbFail("参数太多");
- acedRetVoid();
- return RTERROR;
- }
- acedSetStatusBarProgressMeterPos(mins);
- acedRetVoid();
- return RTNORM;
- // TODO: Replace the following line by your returned value if any
- acedRetVoid () ;
- return (RSRSLT) ;
- }
- // ----- ads_progress3 symbol (do not rename)
- static int ads_progress3(void)
- {
- //----- Remove the following line if you do not expect any argument for this ADS function
- struct resbuf *pArgs =acedGetArgs () ;
- // TODO: add your code here
- acedRestoreStatusBar();
- // TODO: Replace the following line by your returned value if any
- acedRetVoid () ;
- return (RSRSLT) ;
- }
|