Dialog Header Tuple Object

A tuple describing a dialog box, that can be used to create the dialog.

Comments

For further information, see the win32 SDK for documentation on the DLGTEMPLATE structure.

Items

[0] string : caption

The caption for the window

[1] (int,int,int,int) : (x,y,cx,cy)

The bounding rectange for the dialog.

[2] int : style

The style bits for the dialog. Combination of WS_* and DS_* constants. Note that the DS_SETFONT style need never be specified - it is determined by the font item (below)
The following dialog style flags can be used.

DS_3DLOOKGives the dialog box a nonbold font and draws three-dimensional borders around control windows in the dialog box.
The DS_3DLOOK style is required only by Win32-based applications compiled for versions of Windows earlier than Windows 95 or Windows NT 4.0. The system automatically applies the three-dimensional look to dialog boxes created by applications compiled for current versions of Windows. DS_ABSALIGNIndicates that the coordinates of the dialog box are screen coordinates. If this style is not specified, Windows assumes they are client coordinates. DS_CENTERCenters the dialog box in the working area; that is, the area not obscured by the tray. DS_CENTERMOUSECenters the mouse cursor in the dialog box. DS_CONTEXTHELPIncludes a question mark in the title bar of the dialog box. When the user clicks the question mark, the cursor changes to a question mark with a pointer. If the user then clicks a control in the dialog box, the control receives a WM_HELP message. The control should pass the message to the dialog box procedure, which should call the WinHelp function using the HELP_WM_HELP command. The Help application displays a pop-up window that typically contains help for the control.
Note that DS_CONTEXTHELP is only a placeholder. When the dialog box is created, the system checks for DS_CONTEXTHELP and, if it is there, adds WS_EX_CONTEXTHELP to the extended style of the dialog box. WS_EX_CONTEXTHELP cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX styles. DS_CONTROLCreates a dialog box that works well as a child window of another dialog box, much like a page in a property sheet. This style allows the user to tab among the control windows of a child dialog box, use its accelerator keys, and so on. DS_FIXEDSYSCauses the dialog box to use the SYSTEM_FIXED_FONT instead of the default SYSTEM_FONT. SYSTEM_FIXED_FONT is a monospace font compatible with the System font in Windows versions earlier than 3.0. DS_LOCALEDITApplies to 16-bit applications only. This style directs edit controls in the dialog box to allocate memory from the application's data segment. Otherwise, edit controls allocate storage from a global memory object. DS_MODALFRAMECreates a dialog box with a modal dialog-box frame that can be combined with a title bar and System menu by specifying the WS_CAPTION and WS_SYSMENU styles. DS_NOFAILCREATEWindows 95 only: Creates the dialog box even if errors occur - for example, if a child window cannot be created or if the system cannot create a special data segment for an edit control. DS_NOIDLEMSGSuppresses WM_ENTERIDLE messages that Windows would otherwise send to the owner of the dialog box while the dialog box is displayed. DS_SETFOREGROUNDCauses the system to use the SetForegroundWindow function to bring the dialog box to the foreground. DS_SYSMODALCreates a system-modal dialog box. This style causes the dialog box to have the WS_EX_TOPMOST style, but otherwise has no effect on the dialog box or the behavior of other windows in the system when the dialog box is displayed.
[3] int : extStyle

The extended style bits for the dialog.

[4] (int, string) : (fontSize, fontName)

A tuple describing the font, or None if the system default font is to be used.

[5] string/int : menuResource

The resource ID of the menu to be used for the dialog, or None for no menu.

[6] string/int : windowClass

The window class for the dialog, or None. If an int, the value must be an atom returned from RegisterWindowClass.