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: 13
Joined: Tue Jul 02, 2019 1:25 pm

Customize X (close) button behaviour

Post 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!
Kvaz1r
Super wx Problem Solver
Super wx Problem Solver
Posts: 357
Joined: Tue Jun 07, 2016 1:07 pm

Re: Customize X (close) button behaviour

Post by Kvaz1r »

Handle OnClose event.

Events in wxWidgets
Post Reply