31.2.7 Dialog Boxes

Dialog-box functions create, alter, test, and destroy dialog boxes and controls within dialog boxes. A dialog box is a temporary window that Windows creates for special-purpose input, and then destroys immediately after use. An application typically uses a dialog box to prompt the user for additional information about a current command selection. The following list briefly describes each dialog function:

Function Description

CheckDlgButton Places/removes a check, or changes the state of the three-state button
CheckRadioButton Checks a specified button and removes checks from all others
CreateDialog Creates a modeless dialog box
CreateDialogIndirect Creates a modeless dialog box from a template
CreateDialogIndirectParam Creates a modeless dialog box from a template and passes data to it when it is created
CreateDialogParam Creates a modeless dialog box and passes data to it when it is created
DefDlgProc Provides default processing for those dialog-box messages that an application does not process
DialogBox Creates a modal dialog box
DialogBoxIndirect Creates a modal dialog box from a template
DialogBoxIndirectParam Creates a modal dialog box from a template and passes data to it when it is created
DialogBoxParam Creates a modal dialog box and passes data to it when it is created
DlgDirList Fills the list box with names of files matching a path
DlgDirListComboBox Fills a combo box with names of files matching a path
DlgDirSelectComboBoxEx Copies the current selection from a combo box to a string
DlgDirSelectEx Copies the current selection from a list box to a string
EndDialog Frees resources and destroys windows associated with a modal dialog box
GetDialogBaseUnits Retrieves the base dialog units used by Windows when creating a dialog box
GetDlgCtrlID Returns the ID value of a control window
GetDlgItem Retrieves the handle of a dialog item from the given dialog box
GetDlgItemInt Translates the control text of an item into an integer value
GetDlgItemText Copies an item's control text into a string
GetNextDlgGroupItem Returns the window handle of the next item in a group
GetNextDlgTabItem Returns the window handle of the next or previous item
IsDialogMessage Determines whether a message is intended for the given dialog box
IsDlgButtonChecked Tests whether a button is checked
MapDialogRect Converts the dialog-box coordinates to client coordinates
MessageBoxEx Creates a message box using resources for a specific language.
SendDlgItemMessage Sends a message to an item within a dialog box
SetDlgItemInt Sets the caption or text of an item to a string that represents an integer
SetDlgItemText Sets the caption or text of an item to a string
MessageBox Creates a window with the given text and caption