You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
When a dialog is instructed to close, the Callback Function gets a %WM_SYSCOMMAND | %SC_CLOSE message. This occurs whether the dialog is closed via the System Menu, the Close box, or a DIALOG END statement.
Therefore, if you want to distinguish between your own close routine (that uses DIALOG END) and the System Menu/Close selection, return an appropriate value with the user-defined parameter of the DIALOG END statement. This value is then passed to the calling code.
Since the system Close menu item will close the dialog without regard to a return value, the dialog will return zero to the calling code.
Therefore, detecting how the dialog was closed from within the _calling_ code is simply a matter of setting the return value in the callback, and checking the dialog return value.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment