+There are two kinds of dialog -- {\it modal}\ and {\it modeless}. A modal dialog
+blocks program flow and user input on other windows until it is dismissed,
+whereas a modeless dialog behaves more like a frame in that program flow
+continues, and input in other windows is still possible. To show a modal dialog
+you should use the \helpref{ShowModal}{wxdialogshowmodal} method while to show
+a dialog modelessly you simply use \helpref{Show}{wxdialogshow}, just as with
+frames.
+
+Note that the modal dialog is one of the very few examples of
+wxWindow-derived objects which may be created on the stack and not on the heap.
+In other words, although this code snippet:
+
+\begin{verbatim}
+ void AskUser()
+ {
+ MyAskDialog *dlg = new MyAskDialog(...);
+ if ( dlg->ShowModal() == wxID_OK )
+ ...
+ //else: dialog was cancelled or some another button pressed
+
+ dlg->Destroy();
+ }
+\end{verbatim}
+
+works, you can also achieve the same result by using a simpler code fragment
+below:
+
+\begin{verbatim}
+ void AskUser()
+ {
+ MyAskDialog dlg(...);
+ if ( dlg.ShowModal() == wxID_OK )
+ ...
+
+ // no need to call Destroy() here
+ }
+\end{verbatim}
+
+An application can define a \helpref{wxCloseEvent}{wxcloseevent} handler for
+the dialog to respond to system close events.