Board index » cppbuilder » event for 'X' in form caption

event for 'X' in form caption

How can I perform some actions after the user hits the 'X' in on the form
caption, before my application terminates? Do I need to catch the WM_DESTROY
message for my main form? If that is the only approach, how do I then handle
the message to cancel termination if thats what I want to do? I have
capturing WM's under control, but I just wasn't sure which message I needed
to catch or how to deal with it once I caught it.

Thanks,
Vesty.

 

Re:event for 'X' in form caption


Use the form's OnCloseQuery and/or OnClose event.

Gambit

Quote
"Vesty" <n...@email.com> wrote in message news:3c93e7f7_1@dnews...
> How can I perform some actions after the user hits the 'X' in on the form
> caption, before my application terminates?

Other Threads