I'm relatively new to wxAui and have a problem while detaching a pane.Following situation: A add a pane to the wxAuiManager. The close event is sent to that window, I set with SetManagedWindow. In the method that is called with the close event, I want to detach this pane from the wxAuiManager.

But that causes a runtime error in wxFrameManager::ClosePane at line 1093 in

Thanks for the interesting point. Basically, aui was assuming that you wouldn't detach a pane in the close window handler. I'm going to add a check for that case right now to the 2.8.x branch and the trunk.

But what can I do to avoid that runtime error? I want to remove that frame from the manager to open it again. When I just close it and want to open it again, I get the information, that a frame with this name already exists. Is there another solution?

where m_mgr is wxAuiManager. If I do not stop the event, it calls DetachPane itself. I do not know, why. So I have to detach the pane myself from the manager and destroy it.

If I do not call wnd->Destroy(), the window is still handled in the manager. With the Destroy() method the window is not handled anymore and the GetAllPanes() method returns the correct number of panes, that are shown or hidden.