Hey , I use lsignal : https://github.com/cpp11nullptr/lsignal It is a Qt like signal/slot system. You can call a signal from both click actions in iup, with a different value. Let's say something like :
// declare signal lsignal::signal<void(bool)> clickSig; // call it from click actions okClickAction(Ihandle *handle){ clickSig(true); } cancelClickAction(Ihandle *handle){ clickSig(false); } // suppose you have connected your signal to something : clickSig.connect([&](bool isOk){ if(isOk) //something else //something else } Le vendredi 8 janvier 2021 à 12:50:43 UTC+1, Scott Morgan via Iup-users <iup-users@lists.sourceforge.net> a écrit : Assume you have some iup.dialog with Cancel and OK buttons, where their action events return iup.CLOSE. What's the best way to find which button the user closed the dialog with from an dlg:popup call? I can think of a few methods, but they all seem clunky (i.e. setting a global) Scott _______________________________________________ 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