FRAME control styles

Styles

%BS_BITMAP

Display a bitmap image instead of a text caption.

%BS_CENTER

Center the text horizontally in the frame.

%BS_GROUPBOX 

Display a frame in which other controls can be positioned to infer a "visual association" or relationship between those controls. (persistent)

%BS_ICON

Display an icon image instead of a text caption.

%BS_LEFT

Place the text on the left side of the frame. (default)

%BS_MULTILINE

Wrap the caption text across multiple lines if the text string is too long to fit on a single line. Wrapping is not automatic, but the line wrap position can be specified by inserting a $CR (or $CRLF) character at the desired wrap position in the caption text.

%BS_RIGHT

Place the text on the right side of the frame.

%BS_TEXT

Control displays a text caption/title. (default)

%BS_TOP

Place the text at the top of the frame. (persistent) Note: the %BS_TOP style is persistent - the frame control does not support %BS_BOTTOM alignment.

%WS_BORDER

Add a thin line border around the control.

%WS_DISABLED

Create a control that is initially disabled. A disabled frame control is displayed with grayed text.

%WS_GROUP

Define the start of a group of controls. The first control in each group should also use %WS_TABSTOP style. The next %WS_GROUP control in the tab order defines the end of this group and the start of a new group. Groups configured this way permit the arrow keys to shift focus between the controls within the group, and focus can jump from group to groups with the usual TAB and SHIFT+TAB keys. Both tab stops and groups are permitted to wrap from the end of the tab order back to the start.

It is important to note that Windows does not assume any form of relationship exists between a FRAME control and any controls that are positioned within its client area (with the exception of clipping restrictions imposed by %WS_CLIPCHILDREN and %WS_CLIPSIBLINGS styles). Further, Windows does not infer that any set of controls positioned within a FRAME control will be treated as a group. Such considerations are the responsibility of the programmer to decide which controls will use the %WS_GROUP and %WS_TABSTOP styles.

 

Extended Styles

%WS_EX_CLIENTEDGE

Apply a sunken edge border to the control. (default)

%WS_EX_LEFT

The control has generic "left-aligned" properties. (default)

%WS_EX_RIGHT

The control has generic "right-aligned" properties. This style has an effect only if the shell language is Hebrew, Arabic, or another language that supports reading order alignment; otherwise, the style is ignored.

%WS_EX_STATICEDGE

Apply a three-dimensional border style to the control (intended to be used for items that do not accept user input).

%WS_EX_TRANSPARENT 

Controls/windows beneath the dialog are drawn before the dialog is drawn. The dialog is deemed transparent because elements behind the dialog have already been painted - the dialog itself is not drawn differently. True transparency is achieved by using Regions - see MSDN and/or the Platform SDK documentation for more information.

%WS_EX_WINDOWEDGE

Apply a raised edge border to the control.

 

See Also

Styles reference

CONTROL ADD FRAME