Classes: \helpref{wxCloseEvent}{wxcloseevent}, \helpref{wxWindow}{wxwindow}
Window deletion can be a confusing subject, so this overview is provided
Classes: \helpref{wxCloseEvent}{wxcloseevent}, \helpref{wxWindow}{wxwindow}
Window deletion can be a confusing subject, so this overview is provided
for some window classes, wxWindows delays actual deletion of the window until all events have been processed,
since otherwise there is the danger that events will be sent to a non-existent window.
for some window classes, wxWindows delays actual deletion of the window until all events have been processed,
since otherwise there is the danger that events will be sent to a non-existent window.
\wxheading{How can the application close a window itself?}
Your application can either use \helpref{wxWindow::Close}{wxwindowclose} event just as
\wxheading{How can the application close a window itself?}
Your application can either use \helpref{wxWindow::Close}{wxwindowclose} event just as
generating a wxID\_CANCEL event. Since the handler for this cancel event might
itself call {\bf Close}, there is a check for infinite looping. The default handler
for wxID\_CANCEL hides the dialog (if modeless) or calls EndModal(wxID\_CANCEL) (if modal).
generating a wxID\_CANCEL event. Since the handler for this cancel event might
itself call {\bf Close}, there is a check for infinite looping. The default handler
for wxID\_CANCEL hides the dialog (if modeless) or calls EndModal(wxID\_CANCEL) (if modal).
on the stack, so the assumption of dynamic creation cannot be made).
The default close event handler for wxFrame destroys the frame using Destroy().
on the stack, so the assumption of dynamic creation cannot be made).
The default close event handler for wxFrame destroys the frame using Destroy().