多功能对话框
1 extern DllExport void ufsta(char *param, int *returnCode, int rlen) 2 { 3 UF_initialize(); 4 5 //询问对话框 6 string strTitle = "标题"; 7 string strMsg = "提示信息"; 8 string bottonStr1 = "左键";//返回1 9 string bottonStr2 = "右键";//返回2 10 UF_UI_MESSAGE_DIALOG_TYPE dialog_type = UF_UI_MESSAGE_QUESTION; 11 /* 12 UF_UI_MESSAGE_ERROR//错误图标 13 UF_UI_MESSAGE_WARNING//警告图标 14 UF_UI_MESSAGE_INFORMATION//信息图标 15 UF_UI_MESSAGE_QUESTION//询问图标 16 */ 17 18 int response = 0; 19 char *title_string = (char*)strTitle.c_str(); 20 char * psMessages = (char*)strMsg.c_str(); 21 22 UF_UI_message_buttons_s button; 23 button.button1 = true; //按钮的数量 24 button.button2 = true; 25 button.button3 = false; 26 button.label1 = (char*)bottonStr1.c_str(); //按钮的名称 27 button.label2 = (char*)bottonStr2.c_str(); 28 button.label3 = ""; 29 button.response1 = 1; //点击后的返回值 30 button.response2 = 2; 31 button.response3 = 3; 32 UF_UI_message_dialog(title_string, dialog_type, &psMessages, 1, 0, &button, &response); 33 34 UF_terminate(); 35 } 36 37 extern int ufusr_ask_unload(void) 38 { 39 return (UF_UNLOAD_IMMEDIATELY); 40 }