WinXDialog_Question (hWnd, text$, title$, cancel, defaultButton)
Displays a dialog box asking the user a simple yes/no question
Parameter | Description |
---|---|
hWnd | The handle to the owner window, 0 for no owner window |
text$ | The question to ask the user |
title$ | The title of the dialog box |
cancel | $$TRUE to display a Cancel button in addition to the Yes and No buttons |
defaultButton | the index of the default button, 0 for Yes, 1 for No, 2 for Cancel |
$$IDYES if the user clicks Yes, $$IDNO if the user clicks No and $$IDCANCEL if the users clicks Cancel.
This dialog box is good for asking the user if they want to save their work before quitting. To detect when the user tries to quit, use the onClose callback. Beware of overusing this dialog as it can annoy the user. Also, make sure to set the defaultButton intelligently. If it is No and the user hits enter before reading the dialog they will loose their work.
' Ask the user a question, the default response is no WinXDialog_Question (#hMain, "Do you really want to do this?", "", $$FALSE, 1) |