OK, below code: int alarm = IupMessageAlarm( null, "IupMessageAlarm", "Test", "YESNO" ); if( alarm == 1 ) IupMessage( "", "1" ); else if( alarm == 2 ) IupMessage( "", "2" ); else IupMessage( "", "?" );
On windows, after the dialog popup, press "ESC" is nothing happen, press "ENTER" will return 1 or 2( because we can change the focus on "YES" or "NO" button by left/right direction key ) On linux, after the dialog popup, press "ESC" always return 1, press "ENTER" will return 1 or 2( because we can change the focus on "YES" or "NO" by left/right direction key ) ( my linux is Linux mint 19.1, IUP Version=3.27 GTK Version=3.22.30 GTK Dev Version=3.18.9 ) Antonio Scuri <antonio.sc...@gmail.com> 於 2019年8月13日 週二 下午7:51寫道: > Sorry, now I don't get what the problem is. Can you send more details? > > Best, > Scuri > > > Em seg, 12 de ago de 2019 às 11:13, 許永寬 <nagahiro....@gmail.com> escreveu: > >> Sorry for I didn't describe clear, >> On Windows 7, It works as you say, but on linux, press "ESC" will get >> "Returns" = 1 >> >> >> Antonio Scuri <antonio.sc...@gmail.com> 於 2019年8月12日 週一 下午9:01寫道: >> >>> Hi, >>> >>> IupMessageAlarm uses IupMessageDlg, which is a native pre-defined >>> dialog. It does not have support for DEFAULTESC. >>> >>> IupAlarm is a IupDialog and we control everything. >>> >>> Best, >>> Scuri >>> >>> >>> Em dom, 11 de ago de 2019 às 10:10, 許永寬 <nagahiro....@gmail.com> >>> escreveu: >>> >>>> Dear Scuri: >>>> I created an IupMessageAlarm with "YESNO" parameter, but whatever I >>>> press "ENTER" or "ESC", the button 1 -- "YES" always be trigger, not like >>>> IupAlarm function. >>>> _______________________________________________ >>>> Iup-users mailing list >>>> Iup-users@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/iup-users >>>> >>> _______________________________________________ >>> Iup-users mailing list >>> Iup-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/iup-users >>> >> _______________________________________________ >> Iup-users mailing list >> Iup-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/iup-users >> > _______________________________________________ > Iup-users mailing list > Iup-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/iup-users >
_______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users