NX二次开发-UFUN多按钮模态对话框UF_UI_message_dialog

 1 NX11+VS2013
 2 
 3 
 4 #include <uf.h>
 5 #include <uf_ui.h>
 6 
 7 
 8 UF_initialize();
 9 
10 //多按钮模态对话框
11 int response = 0;
12 char title_string[] = "这里是标题";
13 char *sMessages = "这里是提示内容";
14 UF_UI_MESSAGE_DIALOG_TYPE dialog_type = UF_UI_MESSAGE_ERROR;//对话框类型UF_UI_MESSAGE_ERROR,UF_UI_MESSAGE_WARNING,UF_UI_MESSAGE_INFORMATION,UF_UI_MESSAGE_QUESTION
15 UF_UI_message_buttons_s button;
16 button.button1 = true;//控制按钮的数量
17 button.button2 = true;
18 button.button3 = true;
19 button.label1 = "";//按钮的名字
20 button.label2 = "";
21 button.label3 = "取消";
22 button.response1 = 1;//按钮的返回值
23 button.response2 = 2;
24 button.response3 = 3;
25 UF_UI_message_dialog(title_string, dialog_type, &sMessages, 1, 0, &button, &response);
26 switch (response)
27 {
28     case 1:uc1601(button.label1, 1); break;//显示所选按钮的名字
29     case 2:uc1601(button.label2, 1); break;
30     case 3:uc1601(button.label3, 1); break;
31     default:uc1601("未知按钮", 1); break;
32 }
33 
34 
35 UF_terminate();
36 
37 Caesar卢尚宇
38 2019年6月27日

猜你喜欢

转载自www.cnblogs.com/nxopen2018/p/11099351.html