八、NX二开对话框对象多选还是单选

1、UF_UI_select_with_single_dialog (#include <uf_ui.h> )

 char     title[]="";  

 char     cue[] = "";   

int      response=0;   

 double   cursor [3];   

tag_t    face = NULL;  

 tag_t    view = NULL;       

 if(!UF_CALL(UF_UI_select_with_single_dialog( cue, title, UF_UI_SEL_SCOPE_NO_CHANGE, init_proc_face, NULL, &response,&face,cursor ,&view)))   

{          if (response == UF_UI_OBJECT_SELECTED ||   response == UF_UI_OBJECT_SELECTED_BY_NAME)  

  { 

      printf("object tag = %d\n", face);       

  } 

   UF_DISP_set_highlight(face, 0);//关高亮  

 } 

2、UF_UI_select_with_class_dialog (#include <uf_ui.h> )

void class_sel_dlg(int *count,tag_p_t *objects)

 { 

 char cue[] = ""; 

  char title[] = ""; 

  int response, sel_count, i;   tag_p_t sel_objects;     

  if((UF_CALL(UF_UI_select_with_class_dialog( cue, title, UF_UI_SEL_SCOPE_NO_CHANGE,      , NULL, &response, &sel_count, &sel_objects))) == 0)   

     { 

             printf("object count = %d\n",sel_count);   

              if (response == UF_UI_OK && sel_count > 0)    

              {  

                 *objects=sel_objects;     *count=sel_count; 

                   for (i=0; i<sel_count; i++)    

                       { 

                              printf("object tag = %d\n", sel_objects[i]);      

                               UF_DISP_set_highlight(sel_objects[i], 0);  

                           } 

                        UF_free(objects);    

                   } 

          }

    } 

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值