Page 1 of 1

Customize X (close) button behaviour

Posted: Wed Aug 21, 2019 7:29 pm
by devhobby
Hi.

I have a function, say, MyExit() which internally calls Close(true) after doing some checks here and there.

Now I want these checks to be done when the user presses the X (close window) button as well.

So I would like to link the close window event to the function MyExit() which then calls Close(true).

Any idea?

Thanks in advance!

Re: Customize X (close) button behaviour

Posted: Wed Aug 21, 2019 7:34 pm
by Kvaz1r
Handle OnClose event.

Events in wxWidgets