Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/152.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 如何知道wxFrame何时关闭?_C++_Events_Wxwidgets - Fatal编程技术网

C++ 如何知道wxFrame何时关闭?

C++ 如何知道wxFrame何时关闭?,c++,events,wxwidgets,C++,Events,Wxwidgets,我有一个wxDialog,在这里我打开了一个wxFrame。现在我想知道wxFrame何时关闭,这样我就可以在对话框调用者中做一些事情[在这个框架上,我修改了一个列表,该列表也出现在对话框中,我需要更新它(使用我提供的函数)] 有什么想法吗?我使用的是WXWIDGET 2.8~10/P> C++ 下面是调用框架的函数的代码: OK=false; password dialog(this,&OK); //I check the admin password, if it's correct

我有一个wxDialog,在这里我打开了一个wxFrame。现在我想知道wxFrame何时关闭,这样我就可以在对话框调用者中做一些事情[在这个框架上,我修改了一个列表,该列表也出现在对话框中,我需要更新它(使用我提供的函数)]

有什么想法吗?我使用的是WXWIDGET 2.8~10/P> C++ 下面是调用框架的函数的代码:

OK=false;
password dialog(this,&OK); //I check the admin password, if it's 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)

通过处理,您将知道框架何时关闭。在处理程序中,尽一切可能通知“对话框调用者”它应该重新加载(例如通过发布事件)


顺便说一句,showmodel在对话框关闭之前不会返回,它将返回一个值(由设置)。那个么你们就不需要乱弄OK参考了

谢谢,我想一定是你说的。事实上,“好”的方式是完全不必要的,我要避免它。再次感谢你!