Düzenle

Aracılığıyla paylaş


DIALOGEX resource

Defines a dialog box. The statement defines the position and dimensions of the dialog box on the screen as well as the dialog box style. It also defines the following:

  • Help IDs on the dialog itself as well as on controls within the dialog box.
  • Use of the EXSTYLE statement for the dialog box itself as well as on controls within the dialog box.
  • Font weight and italic settings for the font to be used in the dialog box.
  • Control-specific data for controls within the dialog box.
  • Use of the BEDIT, IEDIT, and HEDIT predefined system class names.
nameID DIALOGEX x, y, width, height [ , helpID] [optional-statements]  {control-statements}

Parameters

nameID

Unique name or a unique 16-bit unsigned integer value that identifies the dialog box.

x

Location on the screen of the left side of the dialog box, in dialog units.

y

Location on the screen of the top of the dialog box, in dialog units.

width

Width of the dialog box, in dialog units.

height

Height of the dialog box, in dialog units.

helpID

Numeric expression indicating the ID used to identify the dialog box during WM_HELP processing.

optional-statements

Options for the dialog box. This can be zero or more of the following statements.

Statement Description
CAPTION "text" Caption of the dialog box if it has a title bar. For more information, see CAPTION Statement.
CHARACTERISTICS dword User-defined DWORD value for use by resource tools. This value is not used by the system. For more information, see CHARACTERISTICS Statement.
CLASSclass A 16-bit unsigned integer or a string, enclosed in double quotation marks ("), that identifies the class of the dialog box. For more information, see CLASS Statement.
EXSTYLE= extended-styles Extended window style of the dialog box. For more information, see EXSTYLE Statement.
FONT pointsize, "typeface", weight, italic, charset Point size and typeface for the font. For weight, use the FW_* values defined in WinGDI.h. For italic, specify TRUE to use an italic font, FALSE otherwise. For charset, use the value defined in the lfCharSet member of the LOGFONT structure. To get the definitive font for a dialog box, an application should specify charset along with other font properties. For more information, see FONT Statement.
LANGUAGE language, sublanguage Language of the dialog box. For more information, see LANGUAGE Statement.
MENU menuname Menu to be used. This value is either the name of the menu or its integer identifier. For more information, see MENU Statement.
STYLE styles Styles of the dialog box. For more information, see STYLE Statement.
VERSION dword User-defined DWORD value. This statement is intended for use by additional resource tools and is not used by the system. For more information, see VERSION Statement.

 

control-statements

Body of the DIALOGEX resource is made up of any number of control statements. There are four families of control statements: generic, static, button, and edit. For more information, see Remarks.

Certain attributes are also supported for backward compatibility. For more information, see Common Resource Attributes.

Remarks

The valid operations that may be contained in any of the numeric expressions in the statements of DIALOGEX are as follows:

  • Add ('+')
  • Subtract ('-')
  • Unary minus ('-')
  • Unary NOT ('~')
  • AND ('&')
  • OR ('|')

The body of the resource is made up of generic, static, button, and edit control statements. While each of these families of statements uses a different syntax for defining specific features of its controls, they all share a common syntax for defining the position, size, extended styles, help identification number, and control-specific data. For more information, see Common Control Parameters.

Generic Control Statements

CONTROL controlText, id, className, style

controlText

Window text for the control. For more information, see Common Control Parameters.

id

Control identifier. For more information, see Common Control Parameters.

className

Name of the class. This may be either a string enclosed in double quotation marks (") or one of the following predefined system classes: BUTTON, STATIC, EDIT, LISTBOX, SCROLLBAR, or COMBOBOX.

style

Window styles (explicit WS_*, BS_*, SS_*, ES_*, LBS_*, SBS_*, and CBS_* style values defined in Winuser.H can be used by adding an include to the .rc file: #include "winuser.h"). For more information, see Window Styles.

Static Control Statements

staticClass controlText, id

staticClass

LTEXT, RTEXT, or CTEXT.

controlText

Window text for the control. For more information, see Common Control Parameters.

id

Control identifier. For more information, see Common Control Parameters.

Button Control Statements

buttonClass controlText, id

buttonClass

AUTO3STATE, AUTOCHECKBOX, AUTORADIOBUTTON, CHECKBOX, PUSHBOX, PUSHBUTTON, RADIOBUTTON, STATE3, or USERBUTTON.

controlText

Window text for the control. For more information, see Common Control Parameters.

id

Control identifier. For more information, see Common Control Parameters.

Edit Control Statements

editClass id

editClass

EDITTEXT, BEDIT, HEDIT, or IEDIT.

id

Control identifier. For more information, see Common Control Parameters.

See also

Using Dialog Boxes

ACCELERATORS

CHARACTERISTICS

CONTROL

CreateDialog

CreateWindow

DialogBox

GetDialogBaseUnits

LANGUAGE

LOGFONT

MENU

RCDATA

STRINGTABLE

VERSION