LABEL control styles

Styles

%SS_CENTER

Horizontally center the caption text. The text is formatted before it is displayed. Words that extend past the end of a line are automatically wrapped to the beginning of the next centered line.

%SS_CENTERIMAGE

Vertically center the caption text. The text is not wrapped even if it extends beyond the width of the control.

%SS_ENDELLIPSIS

Replace the end of the given string with ellipsis as needed to fit the result in the specified rectangle. Windows NT/2000/XP only.

%SS_ETCHEDFRAME

Draw the frame of the control using an etched edge style.

%SS_ETCHEDHORZ

Draw the horizontal edges of the control using an etched edge style.

%SS_ETCHEDVERT

Draw the vertical edges of the control using an etched edge style.

%SS_LEFT

Left-align the given text. The text is formatted before it is displayed. Words that extend past the end of a line are automatically wrapped to the beginning of the next left-aligned line. (default)

%SS_NOPREFIX

Prevent interpretation of ampersand (&) characters in the label text as control accelerator prefix characters. These are normally displayed with the ampersand removed and the next character in the string underscored.

%SS_NOTIFY

Send %STN_CLICKED and %STN_DBLCLK notification messages to the Callback Function when the user clicks or double-clicks the control.

%SS_NOWORDWRAP

Left-align the given text. Tabs are expanded but words are not wrapped. Text that extends past the end of a line is clipped.

%SS_PATHELLIPSIS

Replace the file path portion of the given string with ellipsis as needed to fit the result in the specified rectangle. Windows 2000/XP only.

%SS_RIGHT

Right-align the given text. The text is formatted before it is displayed. Words that extend past the end of a line are automatically wrapped to the beginning of the next right-aligned line.

%SS_SIMPLE

The caption text is left-aligned. If the control is colored, color is only applied to the region containing the caption text, and the remainder of the control is drawn in standard colors.

%SS_SUNKEN

Draw a half-sunken border around the label control.

%SS_WORDELLIPSIS

Truncate text that does not fit, adding ellipsis as needed. Windows NT/2000/XP only.

%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.

 

Extended Styles

%WS_EX_CLIENTEDGE

Apply a sunken edge border to the control.

%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.

%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 LABEL