>Hi everybody,
>
>I need to implement the following functionality:
>
>Cancel button (and clicking on the Close x button at the top of the form will prompt in case of unsaved changes and let the user to save them or really close/cancel – note, this behavior is non-standard to other application forms where Cancel just cancels without any prompts).
>>So, this is the question I added (see attached), but I am not sure I like it. I am wondering how should I phrase this prompt question - can you please suggest?
>
>Thanks in advance.
Well the "do you want A or B" can't be ever answered with a "OK" or "cancel". Even I would answer it as "yes" (and Marc Grajower with a "no"), so you're missing a "none of the above" :).
Have you forgotten alert.prg? Why do you have to adjust your question to messagebox's limited set of buttons? Can't you make it a more natural question and provide any number of reasonable answers?
"You have entered some data. If you close now, they will be lost. How do you want to proceed" - "save first";"just close";"let me finish that first" (the last being for the case when the user clicked close button accidentally), or any such set of text and buttons.