A dialog box resource contains data for each control in a given dialog box. This data contains the coordinates of the upper-left corner of the control, the dimensions of the control, a control identifier, and so on. A ControlData structure has the following form:
struct ControlData {
WORD x;
WORD y;
WORD cx;
WORD cy;
WORD wID;
DWORD lStyle;
union
{
BYTE class; /* if (class & 0x80) */
char szClass[]; /* otherwise */
} ClassID;
szText;
};
Following are the members in the ControlData structure:
x
Specifies the x-coordinate of the upper-left corner of the control.
y
Specifies the y-coordinate of the upper-left corner of the control.
cx
Specifies the width of the control, in horizontal dialog box units. For a definition of these units, see the DialogBoxHeader structure in the preceding section.
cy
Specifies the height of the control, in vertical dialog box units. For a definition of these units, see the DialogBoxHeader structure in the preceding section.
wID
Identifies the control.
lStyle
Specifies the control style. This member is a combination of the window-style flags that appear in the WINDOWS.H file.
ClassID
Specifies the class type. This member is either a single-byte value or a null-terminated string.
If this member is a byte value, it can be one of the following:
Value | Class type |
0x80 | Button |
0x81 | Edit |
0x82 | Static |
0x83 | List box |
0x84 | Scroll bar |
0x85 | Combo box |
If this number is not a byte value, it takes the form described in the szClass member.
szClass
Identifies the class type. This member is a null-terminated string.
szText
Specifies the control text. This member is a null-terminated string.