How to know when wxFrame is closed?

I have wxDialog where I open wxFrame. Now I want to know when wxFrame is closed, so I can do something in the calling dialog [in the frame I change the list that is present in the dialog and I need to update it (using the function provided by me)].

Any ideas? I am using C ++ with wxWidgets 2.8-10

Here is the function code that calls the frame:

OK=false;
password dialog(this,&OK); //I check the admin password, if it correct, OK is true
dialog.ShowModal();

if (OK){
    GestionFrame* Frame = new GestionFrame(0,listaGlobal); 
    //listaGlobal is a list of names
 Frame->Show(); 
    reload(); //reload the list of names on the dialog, but reload must be called after the frame is closed (and the data is saved)
+3
source share
1 answer

You will know when the frame is closed by wxCloseEvent processing . In the handler, do everything to notify the "Dialog caller" that it should reload (for example, by sending an event).

BTW, ShowModal , , ( EndModal). OK.

+1

Source: https://habr.com/ru/post/1734699/


All Articles