Customize X (close) button behaviour Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
devhobby
Earned a small fee
Earned a small fee
Posts: 10
Joined: Tue Jul 02, 2019 1:25 pm

Customize X (close) button behaviour

Post by devhobby » Wed Aug 21, 2019 7:29 pm

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!

Kvaz1r
Earned some good credits
Earned some good credits
Posts: 132
Joined: Tue Jun 07, 2016 1:07 pm

Re: Customize X (close) button behaviour

Post by Kvaz1r » Wed Aug 21, 2019 7:34 pm

Handle OnClose event.

Events in wxWidgets

Post Reply