Purpose |
Add a frame to a dialog. This is also known as a "group" control, and is typically drawn around controls to indicate a visual association between such controls. A frame control is often used around related Option controls. | ||||||||||||||||
Syntax |
Syntax CONTROL ADD FRAME, hDlg, id&, txt$, x, y, xx, yy [, [style&] [, [exstyle&]]] | ||||||||||||||||
hDlg |
Handle of the dialog in which the frame will be created. The dialog will become the parent of the control. | ||||||||||||||||
id& |
Unique identifier for the control in the range 1 to 65535, frequently specified with numeric equates for clarity of the code. For example, the equate %RelatedItems is more informative than a literal value such as 497. If you will not be changing the text in a frame control after it is created, you may use -1 for the id&; however, best practice suggests identifiers should start at 100 to avoid conflict with any of the standard predefined identifiers. | ||||||||||||||||
txt$ |
Text to be displayed in the frame. An ampersand (&) may be included in txt$ to specify a hot-key. See the Remarks section below. | ||||||||||||||||
x, y |
| ||||||||||||||||
xx |
Integer expression, variable, or numeric literal value, specifying the width of the control. The width is given in the same terms (pixels or dialog units) as the parent dialog. The most common value used in the Microsoft Dialog Editor and Visual Studio is 40 dialog units. | ||||||||||||||||
yy |
Integer expression, variable, or numeric literal value, specifying the height of the control. The height is given in the same terms (pixels or dialog units) as the parent dialog. The most common value used in the Microsoft Dialog Editor and Visual Studio is 14 dialog units. | ||||||||||||||||
style& |
Primary style of the frame control. The default frame style comprises %BS_LEFT, and %BS_TOP. The default style is used only if both the primary and extended parameters are omitted from the statement. For example: CONTROL ADD FRAME, hDlg, id&, txt$, 100, 100, 40, 14, , ' Use default styles Custom style values replace the default values. That is, they are not additional to the default style values - your code must specify all necessary primary and extended style parameters. The primary frame style value can be a combination of any values below, combined together with the OR operator to form a bitmask:
| ||||||||||||||||
exstyle& |
Extended style of the frame control. The default extended frame style comprises %WS_EX_LEFT. The default extended style is used if both the primary and extended parameters are omitted from the CONTROL ADD FRAME statement, in the same manner as style& above. The extended combo box style value can be a combination of any values below, combined together with the OR operator to form a bitmask:
| ||||||||||||||||
Remarks |
A frame control does not send messages to its parent dialog and does not require or support a Callback. | ||||||||||||||||
See also |