那位仁兄帮帮忙!!!!作者: pzytony 时间: 2005-8-18 22:25
在OK回调函数中写入另一个功能代码作者: shuoqi 时间: 2005-8-18 22:44
pzytony兄能否说详细点呢,
static int report( char *file, int line, char *call, int irc)
{
if (irc)
{
char messg[133];
printf("%s, line %d: %s\n", file, line, call);
(UF_get_fail_message(irc, messg)) ?
printf(" returned a %d\n", irc) :
printf(" returned error %d: %s\n", irc, messg);
}
return(irc);
}
static void do_ugopen_api(void)
{
char sCue[]="Select the object.";
char sTitle[]="Select by class.";
int iScope=UF_UI_SEL_SCOPE_NO_CHANGE;
int response;
int count,i;
tag_t* objects;
/* Use multiple class selection with scope set to any object
in the work part and without using an initialization
procedure.
*/
if((UF_CALL(UF_UI_select_with_class_dialog(
sCue, sTitle, UF_UI_SEL_SCOPE_NO_CHANGE,
NULL, NULL, &response, &count, &objects))) == 0)
static int report( char *file, int line, char *call, int irc)
{
if (irc)
{
char messg[133];
printf("%s, line %d: %s\n", file, line, call);
(UF_get_fail_message(irc, messg)) ?
printf(" returned a %d\n", irc) :
printf(" returned error %d: %s\n", irc, messg);
}
return(irc);
}
static void do_ugopen_api(void)
{
char sCue[]="Select the object.";
char sTitle[]="Select by class.";
int iScope=UF_UI_SEL_SCOPE_NO_CHANGE;
int response;
int count,i;
tag_t* objects;
/* Use multiple class selection with scope set to any object
in the work part and without using an initialization
procedure.
*/
if((UF_CALL(UF_UI_select_with_class_dialog(
sCue, sTitle, UF_UI_SEL_SCOPE_NO_CHANGE,
NULL, NULL, &response, &count, &objects))) == 0)
{
printf("object count = %d\n",count);
if (response == UF_UI_OK && count > 0)
{
for (i=0; i<count; i++)
{
printf("object tag = %d\n", objects);
UF_DISP_set_highlight(objects, 0);
}
UF_free(objects);
}
}
}
UF_MB_cb_status_t Application(
UF_MB_widget_t widget, //trigger widget
UF_MB_data_t client_data, //data pointer from action registration
UF_MB_activated_button_p_t button)
{
//make sure user function is availabel.
if(UF_initialize()!=0)
return(UF_MB_CB_CONTINUE);
//enter your callback code here
uc1601("已经选中物体",1);
return(UF_MB_CB_CONTINUE);