. 1 NX11 + VS2013 2 . 3 . 4 #include <uf.h> . 5 #include <uf_ui.h> . 6 . 7 . 8 UF_initialize (); . 9 10 // multi-modal dialog button . 11 int Response = 0 ; 12 is char title_string [] = " this is the title " ; 13 char * sMessages = " this is the prompt content " ; 14 UF_UI_MESSAGE_DIALOG_TYPE DIALOG_TYPE = UF_UI_MESSAGE_ERROR; //Dialog type 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 = to true ; // number of control buttons . 17 button.button2 = to true ; 18 is button.button3 = to true ; . 19 button.label1 = " yes " ; // name of the button 20 button.label2 = " No " ; 21 button.label3 = " cancel " ; 22 button.response1 = 1 ;// button return value 23 is button.response2 = 2 ; 24 button.response3 = . 3 ; 25 UF_UI_message_dialog (title_string, DIALOG_TYPE, & sMessages, . 1 , 0 , & Button, & Response); 26 is Switch (Response) 27 { 28 Case . 1 : uc1601 (button.label1, . 1 ); BREAK ; // display the name of the selected button 29 Case 2 : uc1601 (button.label2, . 1 ); BREAK ; 30 Case . 3: uc1601 (button.label3, . 1 ); BREAK ; 31 is default : uc1601 ( " Unknown button " , . 1 ); BREAK ; 32 } 33 is 34 is 35 UF_terminate (); 36 37 [ Caesar Lushang Yu 38 is June 27, 2019
NX secondary development of a multi-button -UFUN modal dialog UF_UI_message_dialog
Guess you like
Origin www.cnblogs.com/nxopen2018/p/11099351.html
Recommended
Ranking