-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 on other windows is still possible.
-You specify the type of dialog with the {\bf wxDIALOG\_MODAL} and {\bf wxDIALOG\_MODELESS} window
-styles.
-
-A dialog may be loaded from a wxWindows resource file (extension {\tt wxr}), which may itself
-be created by Dialog Editor. For details,
-see \helpref{The wxWindows resource system}{resourceformats}, \helpref{wxWindows resource functions}{resourcefuncs} and
-the resource sample.
-
-An application can define an \helpref{wxCloseEvent}{wxcloseevent} handler for the
-dialog to respond to system close events.
+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 an \helpref{wxCloseEvent}{wxcloseevent} handler for
+the dialog to respond to system close events.