现在学做UG二次开发,碰到一个对话框控件激活的问题,请各位大侠赐教:
需要做的是:当前窗口存在模型时控件便激活(我原来设计UG风格的对话框时把控件设置成INSENSITIVITY了),
我修改了构造函数(应该是在这个函数里面修改吧)如下:
int F_Const_cb ( int dialog_id,
void * client_data,
UF_STYLER_item_value_type_p_t callback_data)
{
/* Make sure User Function is available. */
if ( UF_initialize() != 0)
return ( UF_UI_CB_CONTINUE_DIALOG );
/* ---- Enter your callback code here ----- */
/////////////////////////////////////////////////////////////////////////以下是我修改的程序
tag_t obj_tag=UF_ASSEM_ask_work_part();
if (obj_tag!=NULL_TAG)
else
uc1601("There is no object here",1);
//////////////////////////////////////////////////////////////////////////////////////////////////////////
UF_terminate ();
/* Callback acknowledged, do not terminate dialog */
return (UF_UI_CB_CONTINUE_DIALOG);
/* A return value of UF_UI_CB_EXIT_DIALOG will not be accepted */
/* for this callback type. You must continue dialog construction.*/
}
编译后提示出错:
error C2228: left of '.item_attr' must have class/struct/union type
error C2228: left of '.item_id' must have class/struct/union type
error C2664: 'UF_STYLER_set_value' : cannot convert parameter 2 from 'struct UF_STYLER_item_value_type_s ** ' to 'struct UF_STYLER_item_value_type_s *'