Standard Windows Dialog Boxes

Windows provides a number of standard dialog boxes.

Visual Basic | Delphi | C++ Builder | Java

Visual Basic 6.0


Delphi provides several methods to access the Windows standard dialog boxes The following provides a function similar to the VisualBasic MsgBox function The following code is copied from the Delphi 5 help. Notice that the conversion of Delphi string constants to PChar is automatic - the conversion of string variables is NOT. The flag constants are directly from the Windows MessageBox help (click See Also / MessageBox). This allows one of 4 icons to be displayed as well as a number of different button configurations. To get a list of acceptable choices, with the cursor in the correct spot, press Ctrl-Space and type mb_. :) The following returns user entered text

C++ Builder


Start with the Sun Dialog Tutorial. (Interestingly, this tutorial says to use "\n" for a newline.) The following example shows how to select the icon and to specify the text on the buttons.

Using simple awt technology, Creating a Reusable Message Box discusses how to create standard dialog boxes from Dialog.

Author: Robert Clemenzi -
URL: http:// / user / clemenzi / technical / Languages / DialogBoxes.htm