RCML : RC Markup Language

Program Manager Alias markcarr
Developer Alias FelixA
Test Reviewer (if appropriate)  
Technical Editor (if appropriate)  
Title RCML
Filename RCML
Version 1.0
Team/Group Apps+ as part of Win+
Feature Area UI Presentation
For internal user only, or OK for external distribution Internal Use.

Contents

Summary
Design Goals
File Definition
Rendering
Data-Binding
Usage
Open Issues
For More Information
Change History
Appendices
Testing
Summary

RCML is a new resource file format, that is designed to provide access to more Win32 UI features than existing RC files. In addition to the RC file format, there is an enhance version of DialogBox that works hand in hand with the RCML file to make use of the enhanced data in the RCML file.

Design Goals

RCML exposes current technology used in Win32 applications today, which currently are underused or require menial coding efforts to make use of, here are a list of examples / deficiencies.

  1. The upper and lower bound of the slider cannot be set in the RC file.
  2. The contents of the list box are not specifiable in the RC file.
  3. The contents of the combo box are not specifiable in the RC file.
  4. Only BMP and ICO file formats are supported by statics.
  5. There is no relative positioning of controls, only absolute positioning.
  6. There is no exposure of fonts and colors on a per control basis.
  7. There is no sound support (sonnificiation) of UI in dialogs.
  8. There is no HTML like support in the static control (e.g. links).

In addition it is a goal that the existing DialogProc can be re-used, as is, with no alterations.

There will be a tool provided that will convert existing (static) dialogs into RCML file format.

Leveraging new features require minimal change to the RCML file, and where possible will resemble HTML like syntax (e.g. STYLE elements).

The resulting RCML file will then be bound back into the resources for the application, and used/referenced like any other RC file format. This allows the RC dialogs to participate in the whole RC file (including access to ICONS, BMPs etc).

The file format will be extensible, but any elements not understood by the loader will be skipped in their entirety. This allows other applications to inject elements into the RCML stream for their own private use. Access to these skipped elements may be provided at runtime through the XMLDialogProc.

File Definition

The file definition will support all existing Dialog resources, by simply exposing all the current properties as properties on the CONTROL element. Higher level elements will be substituted where applicable (e.g. <BUTTON> rather than <CONTROL CLASS="BUTTON" STYLE=xxxx SYLTEEX=yyyy>).

Elements support so far:

CONTROL

Control is the base element for specifying the type location size and style of windows controls. This is the base element for all higher level controls.

ATTRIBUTES :  ID CLASS TEXT WIDTH HEIGHT X Y STYLE WINDOWSTYLE STYLEEX 
ELEMENTS : LOCATION STYLE HELP

DIALOG

The toplevel element, derives from CONTOL.

ATTRIBUTES : TITLE FONT FONTSIZE RESIZE (see also CONTROL)
ELEMENTS : STYLE CONTROL BUTTON EDIT LIST LABEL  

BUTTON

A push button. See control for more attributes / elements.

ATTRIBUTE : DEFPUSHBUTTON
ELEMENTS : (see control)

CHECKBOX

A check button. See control for more attributes / elements.

ATTRIBUTE : (see also control)
ELEMENTS : (see control)

EDIT

An edit control. See control for more attributes / elements.

ATTRIBUTE : CLASSIFICATION LENGTH (see also control)
ELEMENTS : (see control)

GROUPBOX

A GroupBox control. See control for more attributes / elements.

ATTRIBUTE : 
ELEMENTS : (see control)

LABEL

A Static / Label control. See control for more attributes / elements.

ATTRIBUTE : 
ELEMENTS : (see control)

SPINNER

A Spinner (msctls_updown32) control. See control for more attributes / elements.

ATTRIBUTE : 
ELEMENTS : (see control)

SLIDER

A Slider (msctls_trackbar32) control. See control for more attributes / elements.

ATTRIBUTE : 
ELEMENTS : (see control)

PROGRESS

A progressbar (msctls_progress32) control. See control for more attributes / elements.

ATTRIBUTE : 
ELEMENTS : (see control)

COMBOBOX

A combobox (COMBO) control. See control for more attributes / elements.

ATTRIBUTE : 
ELEMENTS : (see control)

LISTBOX

A combobox (COMBO) control. See control for more attributes / elements.

ATTRIBUTE : 
ELEMENTS : (see control)

LISTVIEW

A more complex version of LISTBOX (SysListView32). See control for more attributes / elements.

ATTRIBUTE : 
ELEMENTS : (see control)

IMAGE

A control capable of displaying an image. Expect to support GIF JPEG PNG and Alpha levels. See control for more attributes / elements.

ATTRIBUTE : 
ELEMENTS : (see control)

HELP

This element contains all manner of additional help related to the control, including "TOOLTIP" "BALLOONTIP" "CONTEXT"

ATTRIBUTE : TOOLTIP BALLOONTIP CONTEXT
ELEMENTS : 

 

LOCATION

The location element is used to specify a relative location for a control (required RELATIVE=YES attribute on the parent element).

ATTRIBUTE : X Y WIDTH HEIGHT EDGE WIDER TALLER
ELEMENTS : <NONE>

Example:

<BUTTON X=10 Y=10 WIDTH=40 HEIGHT=10 TEXT="OK" ID="1"/>

<BUTTON RELATIVE="YES" TEXT="Cancel" ID="2">

    <LOCATION Y="+14" EDGET="0"/>

</BUTTON>

This will produce two buttons one at (10,10) the other at (10,24). The width and height of the Cancel button will be inherited from the OK button, and will be 40 and 10 respectively. The buttons will 'move' in a group, so changing the X=10 to X=120 will place BOTH buttons on the right hand edge of the dialog.

To obtain an 'intra' control spacing, the delta can be made from the bottom left corner of the control.

<BUTTON X=10 Y=10 WIDTH=40 HEIGHT=10 TEXT="OK" ID="1"/>

<BUTTON RELATIVE="YES" TEXT="Cancel" ID="2">

    <LOCATION Y="+4" EDGET="3"/>

</BUTTON>

This ensures that there is always a gap of 4 DLUs between controls, regardless of the height of the previous control.

STYLE

The style element is similar to the style element in HTML.

ATTRIBUTE : FONT-FAMILY FONT-SIZE FONT-STYLE FONT-WEGHT BACKGROUND-COLOR COLOR
ELEMENTS : <NONE>

You should refer to the W3C documentation for the meaning of these attributes. If the style element is added at the dialog level, all child controls 'inherit' this style. HOWEVER if a child specifies its own STYLE element, this overrides ALL the styles, there is no 'merging' of attributes. This is work in progress.

More Controls
Enhancements to Existing Controls
Enhancement Elements.

In addition to Style and Location

Open Issues

Default Style for control classes, e.g.

<STYLE ID="BUTTON" COLOR="LightBlue" />

<BUTTON TEXT="Cancel" ID="2" .../>

</BUTTON>

Results in a LightBlue colored button.

Default Style for control classes, e.g.

<STYLE ID="BUTTON" COLOR="LightBlue" />

<STYLE ID="OKBUTTON" COLOR="Red" />

<BUTTON TEXT="OK" ID="1" STYLEID="OKBUTTON"/>

</BUTTON>

Would result in a Red OK button, but all other buttons would be LightBlue.

For More Information

Here is the set of information provide about their style bits:

Button Styles

If you create a button by specifying the BUTTON class with the CreateWindow or CreateWindowEx function, you can specify a combination of the button styles in the following table.

Style RCML Meaning
BS_3STATE TRISTATE="YES" Creates a button that is the same as a check box, except that the box can be grayed as well as checked or cleared. Use the grayed state to show that the state of the check box is not determined.
BS_AUTO3STATE implied by TRISTATE="YES" Creates a button that is the same as a three-state check box, except that the box changes its state when the user selects it. The state cycles through checked, grayed, and cleared.
BS_AUTOCHECKBOX CHECKBOX is by default, autocheckbox. Creates a button that is the same as a check box, except that the check state automatically toggles between checked and cleared each time the user selects the check box.
BS_AUTORADIOBUTTON RADIODUTTON is by default, auto. Creates a button that is the same as a radio button, except that when the user selects it, The system automatically sets the button's check state to checked and automatically sets the check state for all other buttons in the same group to cleared.
BS_CHECKBOX <CHECKBOX> Creates a small, empty check box with text. By default, the text is displayed to the right of the check box. To display the text to the left of the check box, combine this flag with the BS_LEFTTEXT style (or with the equivalent BS_RIGHTBUTTON style).
BS_DEFPUSHBUTTON DEFPUSH="YES" Creates a push button that behaves like a BS_PUSHBUTTON style button, but also has a heavy black border. If the button is in a dialog box, the user can select the button by pressing the ENTER key, even when the button does not have the input focus. This style is useful for enabling the user to quickly select the most likely (default) option.
BS_GROUPBOX <GROUP> Creates a rectangle in which other controls can be grouped. Any text associated with this style is displayed in the rectangle's upper left corner.
BS_LEFTTEXT By default. Places text on the left side of the radio button or check box when combined with a radio button or check box style. Same as the BS_RIGHTBUTTON style.
BS_OWNERDRAW Creates an owner-drawn button. The owner window receives a WM_MEASUREITEM message when the button is created and a WM_DRAWITEM message when a visual aspect of the button has changed. Do not combine the BS_OWNERDRAW style with any other button styles.
BS_PUSHBUTTON <BUTTON> Creates a push button that posts a WM_COMMAND message to the owner window when the user selects the button.
BS_RADIOBUTTON <RADIOBUTTON> Creates a small circle with text. By default, the text is displayed to the right of the circle. To display the text to the left of the circle, combine this flag with the BS_LEFTTEXT style (or with the equivalent BS_RIGHTBUTTON style). Use radio buttons for groups of related, but mutually exclusive choices.
BS_USERBUTTON Obsolete. Obsolete, but provided for compatibility with 16-bit versions of Windows. Win32-based applications should use BS_OWNERDRAW instead.
BS_BITMAP IMAGE="..." Specifies that the button displays a bitmap.
BS_BOTTOM Use VERTICAL-ALIGN="BOTTOM" Places text at the bottom of the button rectangle.
BS_CENTER Use TEXT-ALIGN="JUSTIFY" Centers text horizontally in the button rectangle.
BS_ICON IMAGE="..." Specifies that the button displays an icon.
BS_FLAT Use BORDER-STYLE="FLAT" Specifies that the button is two-dimensional; it does not use the default shading to create a 3-D image.
BS_LEFT Use TEXT-ALIGN="LEFT" Left-justifies the text in the button rectangle. However, if the button is a check box or radio button that does not have the BS_RIGHTBUTTON style, the text is left justified on the right side of the check box or radio button.
BS_MULTILINE MULTI-LINE="YES" Wraps the button text to multiple lines if the text string is too long to fit on a single line in the button rectangle.
BS_NOTIFY Enables a button to send BN_KILLFOCUS and BN_SETFOCUS notification messages to its parent window.

Note that buttons send the BN_CLICKED notification message regardless of whether it has this style. To get BN_DBLCLK notification messages, the button must have the BS_RADIOBUTTON or BS_OWNERDRAW style.

BS_PUSHLIKE Makes a button (such as a check box, three-state check box, or radio button) look and act like a push button. The button looks raised when it isn't pushed or checked, and sunken when it is pushed or checked.
BS_RIGHT Use TEXT-ALIGN="RIGHT" Right-justifies text in the button rectangle. However, if the button is a check box or radio button that does not have the BS_RIGHTBUTTON style, the text is right justified on the right side of the check box or radio button.
BS_RIGHTBUTTON Positions a radio button's circle or a check box's square on the right side of the button rectangle. Same as the BS_LEFTTEXT style.
BS_TEXT Default. Specifies that the button displays text.
BS_TOP Use VERTICAL-ALIGN="TOP" Places text at the top of the button rectangle.
BS_VCENTER Use VERTICAL-ALIGN="center" Places text in the middle (vertically) of the button rectangle.


Built on: Monday, November 16, 1998

Combo Box Styles

To create a combo box using the CreateWindow or CreateWindowEx function, specify the COMBOBOX class, appropriate window style constants, and a combination of the following combo box styles.

Style RCML Description
CBS_AUTOHSCROLL Automatically scrolls the text in an edit control to the right when the user types a character at the end of the line. If this style is not set, only text that fits within the rectangular boundary is allowed.
CBS_DISABLENOSCROLL Shows a disabled vertical scroll bar in the list box when the box does not contain enough items to scroll. Without this style, the scroll bar is hidden when the list box does not contain enough items.
CBS_DROPDOWN Similar to CBS_SIMPLE, except that the list box is not displayed unless the user selects an icon next to the edit control.
CBS_DROPDOWNLIST Similar to CBS_DROPDOWN, except that the edit control is replaced by a static text item that displays the current selection in the list box.
CBS_HASSTRINGS Specifies that an owner-drawn combo box contains items consisting of strings. The combo box maintains the memory and address for the strings so the application can use the CB_GETLBTEXT message to retrieve the text for a particular item.
CBS_LOWERCASE Converts to lowercase all text in both the selection field and the list.
CBS_NOINTEGRALHEIGHT Specifies that the size of the combo box is exactly the size specified by the application when it created the combo box. Normally, the system sizes a combo box so that it does not display partial items.
CBS_OEMCONVERT Converts text entered in the combo box edit control from the Windows character set to the OEM character set and then back to the Windows set. This ensures proper character conversion when the application calls the CharToOem function to convert a Windows string in the combo box to OEM characters. This style is most useful for combo boxes that contain file names and applies only to combo boxes created with the CBS_SIMPLE or CBS_DROPDOWN style.
CBS_OWNERDRAWFIXED Specifies that the owner of the list box is responsible for drawing its contents and that the items in the list box are all the same height. The owner window receives a WM_MEASUREITEM message when the combo box is created and a WM_DRAWITEM message when a visual aspect of the combo box has changed.
CBS_OWNERDRAWVARIABLE Specifies that the owner of the list box is responsible for drawing its contents and that the items in the list box are variable in height. The owner window receives a WM_MEASUREITEM message for each item in the combo box when you create the combo box and a WM_DRAWITEM message when a visual aspect of the combo box has changed.
CBS_SIMPLE Displays the list box at all times. The current selection in the list box is displayed in the edit control.
CBS_SORT Automatically sorts strings added to the list box.
CBS_UPPERCASE Converts to uppercase all text in both the selection field and the list.

Built on: Monday, November 16, 1998

Edit Control Styles

To create an edit control using the CreateWindow or CreateWindowEx function, specify the EDIT class, appropriate window style constants, and a combination of the following edit control styles.

Style RCML Meaning
ES_AUTOHSCROLL Automatically scrolls text to the right by 10 characters when the user types a character at the end of the line. When the user presses the ENTER key, the control scrolls all text back to position zero.
ES_AUTOVSCROLL Automatically scrolls text up one page when the user presses the ENTER key on the last line.
ES_CENTER Windows NT 5.0 and later; Windows 98: Centers text in a single-line or multiline edit control.

Earlier versions of Windows and Windows NT: Centers text in a multiline edit control.

ES_LEFT Left aligns text.
ES_LOWERCASE Converts all characters to lowercase as they are typed into the edit control.
ES_MULTILINE Designates a multiline edit control. The default is single-line edit control.
  When the multiline edit control is in a dialog box, the default response to pressing the ENTER key is to activate the default button. To use the ENTER key as a carriage return, use the ES_WANTRETURN style.
When the multiline edit control is not in a dialog box and the ES_AUTOVSCROLL style is specified, the edit control shows as many lines as possible and scrolls vertically when the user presses the ENTER key. If you do not specify ES_AUTOVSCROLL, the edit control shows as many lines as possible and beeps if the user presses the ENTER key when no more lines can be displayed.
If you specify the ES_AUTOHSCROLL style, the multiline edit control automatically scrolls horizontally when the caret goes past the right edge of the control. To start a new line, the user must press the ENTER key. If you do not specify ES_AUTOHSCROLL, the control automatically wraps words to the beginning of the next line when necessary. A new line is also started if the user presses the ENTER key. The window size determines the position of the wordwrap. If the window size changes, the wordwrapping position changes and the text is redisplayed.
Multiline edit controls can have scroll bars. An edit control with scroll bars processes its own scroll bar messages. Note that edit controls without scroll bars scroll as described in the previous paragraphs and process any scroll messages sent by the parent window.
ES_NOHIDESEL Negates the default behavior for an edit control. The default behavior hides the selection when the control loses the input focus and inverts the selection when the control receives the input focus. If you specify ES_NOHIDESEL, the selected text is inverted, even if the control does not have the focus.
ES_NUMBER Allows only digits to be entered into the edit control.
ES_OEMCONVERT Converts text entered in the edit control. The text is converted from the Windows character set to the OEM character set and then back to the Windows set. This ensures proper character conversion when the application calls the CharToOem function to convert a Windows string in the edit control to OEM characters. This style is most useful for edit controls that contain filenames.
ES_PASSWORD Displays an asterisk (*) for each character typed into the edit control. You can use the EM_SETPASSWORDCHAR message to change the character that is displayed. The ES_PASSWORD style is valid only for single-line edit controls.
ES_READONLY Prevents the user from typing or editing text in the edit control.
ES_RIGHT Windows NT 5.0 and later; Windows 98: Right aligns text in a single-line or multiline edit control.

Earlier versions of Windows and Windows NT: Right aligns text in a multiline edit control.

ES_UPPERCASE Converts all characters to uppercase as they are typed into the edit control.
ES_WANTRETURN Specifies that a carriage return be inserted when the user presses the ENTER key while entering text into a multiline edit control in a dialog box. If you do not specify this style, pressing the ENTER key has the same effect as pressing the dialog box's default push button. This style has no effect on a single-line edit control.

Built on: Monday, November 16, 1998

List Box Styles

To create a list box by using the CreateWindow or CreateWindowEx function, use the LISTBOX class, appropriate window style constants, and the following style constants to define the list box.

List box style RCML Description
LBS_DISABLENOSCROLL Shows a disabled vertical scroll bar for the list box when the box does not contain enough items to scroll. If you do not specify this style, the scroll bar is hidden when the list box does not contain enough items.
LBS_EXTENDEDSEL Allows multiple items to be selected by using the SHIFT key and the mouse or special key combinations.
LBS_HASSTRINGS Specifies that a list box contains items consisting of strings. The list box maintains the memory and addresses for the strings so that the application can use the LB_GETTEXT message to retrieve the text for a particular item. By default, all list boxes except owner-drawn list boxes have this style. You can create an owner-drawn list box either with or without this style.
LBS_MULTICOLUMN Specifies a multicolumn list box that is scrolled horizontally. The LB_SETCOLUMNWIDTH message sets the width of the columns.
LBS_MULTIPLESEL Turns string selection on or off each time the user clicks or double-clicks a string in the list box. The user can select any number of strings.
LBS_NODATA Specifies a no-data list box. Specify this style when the count of items in the list box will exceed one thousand. A no-data list box must also have the LBS_OWNERDRAWFIXED style, but must not have the LBS_SORT or LBS_HASSTRINGS style.

A no-data list box resembles an owner-drawn list box except that it contains no string or bitmap data for an item. Commands to add, insert, or delete an item always ignore any given item data; requests to find a string within the list box always fail. The system sends the WM_DRAWITEM message to the owner window when an item must be drawn. The itemID member of the DRAWITEMSTRUCT structure passed with the WM_DRAWITEM message specifies the line number of the item to be drawn. A no-data list box does not send a WM_DELETEITEM message.

LBS_NOINTEGRALHEIGHT Specifies that the size of the list box is exactly the size specified by the application when it created the list box. Normally, the system sizes a list box so that the list box does not display partial items.
LBS_NOREDRAW Specifies that the list box's appearance is not updated when changes are made. You can change this style by sending a WM_SETREDRAW message at any time.
LBS_NOSEL Specifies that the list box contains items that can be viewed but not selected.
LBS_NOTIFY Notifies the parent window with an input message whenever the user clicks or double-clicks a string in the list box.
LBS_OWNERDRAWFIXED Specifies that the owner of the list box is responsible for drawing its contents and that the items in the list box are the same height. The owner window receives a WM_MEASUREITEM message when the list box is created and a WM_DRAWITEM message when a visual aspect of the list box has changed.
LBS_OWNERDRAWVARIABLE Specifies that the owner of the list box is responsible for drawing its contents and that the items in the list box are variable in height. The owner window receives a WM_MEASUREITEM message for each item in the combo box when the combo box is created and a WM_DRAWITEM message when a visual aspect of the combo box has changed.
LBS_SORT Sorts strings in the list box alphabetically.
LBS_STANDARD Sorts strings in the list box alphabetically. The parent window receives an input message whenever the user clicks or double-clicks a string. The list box has borders on all sides.
LBS_USETABSTOPS Enables a list box to recognize and expand tab characters when drawing its strings. You can use the LB_SETTABSTOPS message to specify tab stop positions. The default tab positions are 32 dialog template units apart. Dialog template units are the device-independent units used in dialog box templates. To convert measurements from dialog template units to screen units (pixels), use the MapDialogRect function.
LBS_WANTKEYBOARDINPUT Specifies that the owner of the list box receives WM_VKEYTOITEM messages whenever the user presses a key and the list box has the input focus. This enables an application to perform special processing on the keyboard input.


Built on: Monday, November 16, 1998

Scroll Bar Control Styles

To create a scroll bar control using the CreateWindow or CreateWindowEx function specify the SCROLLBAR class, appropriate window style constants, and a combination of the following scroll bar control styles. Some of the styles create a scroll bar control that uses a default width or height. However, you must always specify the x- and y-coordinates and the other dimensions of the scroll bar when you call CreateWindow or CreateWindowEx.

Style RCML Meaning
SBS_BOTTOMALIGN Aligns the bottom edge of the scroll bar with the bottom edge of the rectangle defined by the x, y, nWidth, and nHeight parameters of CreateWindowEx function. The scroll bar has the default height for system scroll bars. Use this style with the SBS_HORZ style.
SBS_HORZ Designates a horizontal scroll bar. If neither the SBS_BOTTOMALIGN nor SBS_TOPALIGN style is specified, the scroll bar has the height, width, and position specified by the x, y, nWidth, and nHeight parameters of CreateWindowEx.
SBS_LEFTALIGN Aligns the left edge of the scroll bar with the left edge of the rectangle defined by the x, y, nWidth, and nHeight parameters of CreateWindowEx. The scroll bar has the default width for system scroll bars. Use this style with the SBS_VERT style.
SBS_RIGHTALIGN Aligns the right edge of the scroll bar with the right edge of the rectangle defined by the x, y, nWidth, and nHeight parameters of CreateWindowEx. The scroll bar has the default width for system scroll bars. Use this style with the SBS_VERT style.
SBS_SIZEBOX Designates a size box. If you specify neither the SBS_SIZEBOXBOTTOMRIGHTALIGN nor the SBS_SIZEBOXTOPLEFTALIGN style, the size box has the height, width, and position specified by the x, y, nWidth, and nHeight parameters of CreateWindowEx.
SBS_SIZEBOXBOTTOMRIGHT
ALIGN
Aligns the lower right corner of the size box with the lower right corner of the rectangle specified by the x, y, nWidth, and nHeight parameters of CreateWindowEx. The size box has the default size for system size boxes. Use this style with the SBS_SIZEBOX style.
SBS_SIZEBOXTOPLEFTALIGN Aligns the upper left corner of the size box with the upper left corner of the rectangle specified by the x, y, nWidth, and nHeight parameters of CreateWindowEx. The size box has the default size for system size boxes. Use this style with the SBS_SIZEBOX style.
SBS_SIZEGRIP Same as SBS_SIZEBOX, but with a raised edge.
SBS_TOPALIGN Aligns the top edge of the scroll bar with the top edge of the rectangle defined by the x, y, nWidth, and nHeight parameters of CreateWindowEx. The scroll bar has the default height for system scroll bars. Use this style with the SBS_HORZ style.
SBS_VERT Designates a vertical scroll bar. If you specify neither the SBS_RIGHTALIGN nor the SBS_LEFTALIGN style, the scroll bar has the height, width, and position specified by the x, y, nWidth, and nHeight parameters of CreateWindowEx.


Built on: Monday, November 16, 1998

Static Control Styles

To create a static control using the CreateWindow or CreateWindowEx function, specify the STATIC class, appropriate window style constants, and a combination of the following static control styles.

Style RCML Description
SS_BITMAP <IMAGE> Specifies a bitmap is to be displayed in the static control. The given text is the name of a bitmap (not a filename) defined elsewhere in the resource file. The style ignores the nWidth and nHeight parameters; the control automatically sizes itself to accommodate the bitmap.
SS_BLACKFRAME <RECT> & <STYLE COLOR="BLACK" BORDER-STYLE="SOLID"> Specifies a box with a frame drawn in the same color as the window frames. This color is black in the default color scheme.
SS_BLACKRECT <RECT FILL="YES"> & <STYLE COLOR="BLACK" BORDER-STYLE="SOLID"> Specifies a rectangle filled with the current window frame color. This color is black in the default color scheme.
SS_CENTER TEXT-ALIGN="JUSTIFY" Specifies a simple rectangle and centers the given text in the rectangle. 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. Words that are longer than the width of the control are truncated.
SS_CENTERIMAGE FILL-BACKGROUND="YES" Specifies that, if the bitmap or icon is smaller than the client area of the static control, the rest of the client area is filled with the color of the pixel in the top left corner of the bitmap or icon. If the static control contains a single line of text, the text is centered vertically in the client area of the control.
SS_ENDELLIPSIS or
SS_PATHELLIPSIS
ELLIPSIS="END"

ELLIPSIS="PATH"

Windows NT: Replaces part of the given string with ellipses, if necessary, so that the result fits in the specified rectangle.

You can specify SS_END_ELLIPSIS to replace characters at the end of the string, or SS_PATHELLIPSIS to replace characters in the middle of the string. If the string contains backslash (\) characters, SS_PATHELLIPSIS preserves as much of the text after the last backslash as possible.

SS_ENHMETAFILE <IMAGE > Specifies an enhanced metafile is to be displayed in the static control. The given text is the name of a metafile. An enhanced metafile static control has a fixed size; the metafile is scaled to fit the static control's client area.
SS_ETCHEDFRAME <RECT> & <STYLE COLOR="BLACK" BORDER-STYLE="SOLID"> Draws the frame of the static control using the EDGE_ETCHED edge style. For more information, see the DrawEdge function.
SS_ETCHEDHORZ Draws the top and bottom edges of the static control using the EDGE_ETCHED edge style. For more information, see the DrawEdge function.
SS_ETCHEDVERT Draws the left and right edges of the static control using the EDGE_ETCHED edge style. For more information, see the DrawEdge function.
SS_GRAYFRAME <RECT> & <STYLE COLOR="GRAY" BORDER-STYLE="SOLID">

 

Specifies a box with a frame drawn with the same color as the screen background (desktop). This color is gray in the default color scheme.
SS_GRAYRECT <RECT FILL="YES"> & <STYLE COLOR="GRAY" BORDER-STYLE="SOLID"> Specifies a rectangle filled with the current screen background color. This color is gray in the default color scheme.
SS_ICON <IMAGE> Specifies an icon is to be displayed in the dialog box. The given text is the name of an icon (not a filename) defined elsewhere in the resource file. The icon can be an animated cursor. The style ignores the nWidth and nHeight parameters; the control automatically sizes itself to accommodate the icon.
SS_LEFT TEXT-ALIGN="LEFT" Specifies a simple rectangle and left-aligns the given text in the rectangle. 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. Words that are longer than the width of the control are truncated.
SS_LEFTNOWORDWRAP MULTILINE="FALSE" Specifies a simple rectangle and left-aligns the given text in the rectangle. Tabs are expanded, but words are not wrapped. Text that extends past the end of a line is clipped.
SS_NOPREFIX Prevents interpretation of any ampersand (&) characters in the control's text as accelerator prefix characters. These are displayed with the ampersand removed and the next character in the string underlined. This static control style may be included with any of the defined static controls. You can combine SS_NOPREFIX with other styles. This can be useful when filenames or other strings that may contain an ampersand (&) must be displayed in a static control in a dialog box.
SS_NOTIFY Sends the parent window STN_CLICKED, STN_DBLCLK, STN_DISABLE, and STN_ENABLE notification messages when the user clicks or double-clicks the control.
SS_OWNERDRAW Specifies that the owner of the static control is responsible for drawing the control. The owner window receives a WM_DRAWITEM message whenever the control needs to be drawn.
SS_REALSIZEIMAGE <IMAGE AUTOSIZE="NO"> Prevents a static icon or bitmap control (that is, static controls that have the SS_ICON or SS_BITMAP style) from being resized as it is loaded or drawn. If the icon or bitmap is larger than the destination area, the image is clipped.
SS_RIGHT TEXT-ALIGN="RIGHT" Specifies a simple rectangle and right-aligns the given text in the rectangle. 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. Words that are longer than the width of the control are truncated.
SS_RIGHTJUST <IMAGE ..> Specifies that the lower right corner of a static control with the SS_BITMAP or SS_ICON style is to remain fixed when the control is resized. Only the top and left sides are adjusted to accommodate a new bitmap or icon.
SS_SIMPLE Specifies a simple rectangle and displays a single line of left-aligned text in the rectangle. The text line cannot be shortened or altered in any way. The control's parent window or dialog box must not process the WM_CTLCOLORSTATIC message.
SS_SUNKEN BORDER-STYLE=" Draws a half-sunken border around a static control.
SS_WHITEFRAME <RECT> & <STYLE COLOR="WHITE" BORDER-STYLE="SOLID"> Specifies a box with a frame drawn with the same color as the window background. This color is white in the default color scheme.
SS_WHITERECT <RECT FILL="YES"> & <STYLE COLOR="WHITE" BORDER-STYLE="SOLID"> Specifies a rectangle filled with the current window background color. This color is white in the default color scheme.
SS_WORDELLIPSIS ELLIPSIS="WORD" Windows NT: Truncates text that does not fit and adds ellipses.


Built on: Monday, November 16, 1998

Window Styles

See Also   CWnd::Create, CWnd::CreateEx

Extended Window Styles

See Also   CWnd::CreateEx

Common Control Window Classes

The following window class names are provided by the common control library:
ANIMATE_CLASS RCML Creates animation controls. These controls silently display an audio video interleaved (AVI) clip.
DATETIMEPICK_CLASS Creates date and time picker controls. These controls provide a simple and intuitive interface to exchange date and time information with a user.
HOTKEY_CLASS Creates hot key controls. These controls make it easy for the user to define hot keys.
MONTHCAL_CLASS Creates month calendar controls. These controls provide a simple and intuitive way for a user to select a date from a familiar interface.
PROGRESS_CLASS Creates progress bars. These controls indicate the progress of a lengthy operation.
REBARCLASSNAME Creates rebar controls. These controls act as a container for child windows.
STATUSCLASSNAME Creates status windows. These controls display status information in a horizontal window.
TOOLBARCLASSNAME Creates toolbars. These controls contain buttons that carry out menu commands.
TOOLTIPS_CLASS Creates tooltip controls. These controls display a small pop-up window containing a line of text that describes the purpose of a tool in an application.
TRACKBAR_CLASS Creates trackbars. These controls let the user select from a range of values by moving a slider.
UPDOWN_CLASS Creates up-down controls. These controls combine a pair of arrows with an edit control. Clicking the arrows increments or decrements the value in the edit control.
WC_COMBOBOXEX Creates ComboBoxEx controls. These controls provide an extension of the combo box control that provides native support for item images.
WC_HEADER Creates header controls. These controls display headings at the top of columns of information and let the user sort the information by clicking the headings.
WC_IPADDRESS Creates IP address controls. These controls are similar to an edit control, but they allow you to enter a numeric address in Internet protocol (IP) format.
WC_LISTVIEW Creates list view controls. These controls display a collection of items, each consisting of an icon and a label, and provide several ways to arrange the items.
WC_PAGESCROLLER Creates pager controls. These controls are used to contain and scroll another window.
WC_TABCONTROL Creates tab controls. These controls define multiple pages for the same area of a window or dialog box. Each page consists of a set of information or a group of controls that an application displays when the user selects the corresponding tab.
WC_TREEVIEW Creates tree view controls. These controls display a hierarchical list of items. Each item consists of a label and an optional bitmap.

Animation Control Styles

The following window styles are used with animation controls:

ACS_AUTOPLAY
Starts playing the animation as soon as the AVI clip is opened.
ACS_CENTER
Centers the animation in the animation control's window.
ACS_TIMER
By default, the control creates a thread to play the AVI clip. If you set this flag, the control plays the clip without creating a thread; internally the control uses a Win32 timer to synchronize playback.
ACS_TRANSPARENT
Allows you to match an animation's background color to that of the underlying window, creating a "transparent" background. The control will send a WM_CTLCOLORSTATIC message to its parent. You should return a handle to a brush with the appropriate background color. The control interprets the upper-left pixel of the first frame as the animation's default background color. It will remap all pixels with that color to the value you supplied in response to WM_CTLCOLORSTATIC.

ComboBoxEx control extended styles

ComboBoxEx controls support most standard combo box control styles. Additionally, ComboBoxEx controls support the following extended styles, which you can set and retrieve by using CBEM_SETEXTENDEDSTYLE and CBEM_GETEXTENDEDSTYLE messages:

CBES_EX_CASESENSITIVE
String searches in the list will be case sensitive. This includes searches as a result of text being typed in the edit box and the CB_FINDSTRINGEXACT message.
CBES_EX_NOEDITIMAGE
The edit box and the dropdown list will not display item images.
CBES_EX_NOEDITIMAGEINDENT
The edit box and the dropdown list will not display item images.
CBES_EX_NOSIZELIMIT
Allows the ComboBoxEx control to be vertically sized smaller than its contained combo box control. If the ComboBoxEx is sized smaller than the combo box, the combo box will be clipped.
CBES_EX_PATHWORDBREAKPROC
Windows NT only. The edit box will use the slash (/), backslash (\), and period (.) characters as word delimiters. This makes keyboard shortcuts for word-by-word cursor movement (CTRL+ARROW) effective in path names and URLs.

Note: if you try to set an extended style for a ComboBoxEx control created with the CBS_SIMPLE style, it may not repaint properly. The CBS_SIMPLE style also does not work properly with the CBES_EX_PATHWORDBREAKPROC extended style.

Date and time picker control styles

The window styles listed here are specific to date and time picker controls. The DTS_XXXFORMAT styles that define the display format cannot be combined. If none of the format styles are suitable, use a DTM_SETFORMAT message to define a custom format.
DTS_APPCANPARSE RCML Allows the owner to parse user input and take necessary action. It enables users to edit within the client area of the control when they press the F2 key. The control sends DTN_USERSTRING notification messages when users are finished.
DTS_LONGDATEFORMAT Displays the date in long format. The default format string for this style is defined by LOCALE_SLONGDATEFORMAT, which produces output like "Friday, April 19, 1996".
DTS_RIGHTALIGN The drop-down month calendar will be right-aligned with the control instead of left-aligned, which is the default.
DTS_SHOWNONE It is possible to have no date currently selected in the control. With this style, the control displays a check box that users can check once they have entered or selected a date. Until this check box is checked, the application will not be able to retrieve the date from the control because, in essence, the control has no date. This state can be set with the DTM_SETSYSTEMTIME message or queried with the DTM_GETSYSTEMTIME message.
DTS_SHORTDATEFORMAT Displays the date in short format. The default format string for this style is defined by LOCALE_SSHORTDATE, which produces output like "4/19/96".
DTS_SHORTDATECENTURYFORMAT Version 5.0. Similar to the DTS_SHORTDATEFORMAT style, except the year is a four-digit field. The default format string for this style is based on LOCALE_SSHORTDATE. The output looks like: "4/19/1996".
DTS_TIMEFORMAT Displays the time. The default format string for this style is defined by LOCALE_STIMEFORMAT, which produces output like "5:31:42 PM".
DTS_UPDOWN Places an up-down control to the right of the DTP control to modify date-time values. This style can be used in place of the drop-down month calendar, which is the default style.

Header Control Styles

Header controls have a number of styles, described below, that determine the control's appearance and behavior. You set the initial styles when you create the header control. To retrieve and change the styles after creating the control, use the GetWindowLong and SetWindowLong functions.

HDS_BUTTONS
Each item in the control looks and behaves like a push button. This style is useful if an application carries out a task when the user clicks an item in the header control. For example, an application could sort information in the columns differently depending on which item the user clicks.
HDS_DRAGDROP
Version 4.70. Allows drag-and-drop reordering of header items.
HDS_FILTERBAR
Version 5.00. Include a filter bar as part of the standard header control. This bar allows users to conveniently apply a filter to the display. Calls to HDM_LAYOUT will yield a new size for the control and cause the list view to update.
HDS_FULLDRAG
Version 4.70. Causes the header control to display column contents even while the user resizes a column.
HDS_HIDDEN
Indicates a header control that is intended to be hidden. This style does not hide the control. Instead, when you send the HDM_LAYOUT message to a header control with the HDS_HIDDEN style, the control returns zero in the cy member of the WINDOWPOS structure. You would then hide the control by setting its height to zero. This can be useful when you want to use the control as an information container instead of a visual control.
HDS_HORZ
Creates a header control with a horizontal orientation.
HDS_HOTTRACK
Version 4.70. Enables hot tracking.

List view window styles

The following window styles are specific to list view controls.

LVS_ALIGNLEFT
Items are left-aligned in icon and small icon view.
LVS_ALIGNTOP
Items are aligned with the top of the list view control in icon and small icon view.
LVS_AUTOARRANGE
Icons are automatically kept arranged in icon and small icon view.
LVS_EDITLABELS
Item text can be edited in place. The parent window must process the LVN_ENDLABELEDIT notification message.
LVS_ICON
Icon view.
LVS_LIST
List view.
LVS_NOCOLUMNHEADER
Column headers are not displayed in report view. By default, columns have headers in report view.
LVS_NOLABELWRAP
Item text is displayed on a single line in icon view. By default, item text may wrap in icon view.
LVS_NOSCROLL
Scrolling is disabled. All items must be within the client area.
LVS_NOSORTHEADER
Column headers do not work like buttons. This style can be used if clicking a column header in report view does not carry out an action, such as sorting.
LVS_OWNERDATA
Version 4.70. Specifies a virtual list view control. For more information about this list control style, see Virtual list view description.
LVS_OWNERDRAWFIXED
The owner window can paint items in report view. The list view control sends a WM_DRAWITEM message to paint each item; it does not send separate messages for each subitem. The itemData member of the DRAWITEMSTRUCT structure contains the item data for the specified list view item.
LVS_REPORT
Report view. When using the LVS_REPORT style with a list view control, the first column is always left-aligned. You cannot use LVCFMT_RIGHT to change this alignment.
LVS_SHAREIMAGELISTS
The image list will not be deleted when the control is destroyed. This style enables the use of the same image lists with multiple list view controls.
LVS_SHOWSELALWAYS
The selection, if any, is always shown, even if the control does not have the focus.
LVS_SINGLESEL
Only one item at a time can be selected. By default, multiple items may be selected.
LVS_SMALLICON
Small icon view.
LVS_SORTASCENDING
Item indices are sorted based on item text in ascending order.
LVS_SORTDESCENDING
Item indices are sorted based on item text in descending order.

Remarks

For the LVS_SORTASCENDING AND LVS_SORTDESCENDING styles, item indices are sorted based on item text in ascending or descending order, respectively. Because the LVS_LIST and LVS_REPORT views display items in in the same order as their indices the results of sorting are immediately visible to the user. The LVS_ICON and LVS_SMALLICON views do not use item indices to determine the position of icons. With those views, the results of sorting are not visible to the user.

You can use the LVS_TYPEMASK mask to isolate the window styles that correspond to the current view: LVS_ICON, LVS_SMALLICON, LVS_LIST, and LVS_REPORT.

You can use the LVS_ALIGNMASK mask to isolate the window styles that specify the alignment of items: LVS_ALIGNLEFT and LVS_ALIGNTOP.

You can use the LVS_TYPESTYLEMASK mask to isolate the window styles that control item alignment (LVS_ALIGNLEFT and LVS_ALIGNTOP) and those that control header appearance and behavior (LVS_NOCOLUMNHEADER and LVS_NOSORTHEADER).

Extended list view styles

List view control styles have been extended. To use these new styles, use the LVM_SETEXTENDEDLISTVIEWSTYLE message or one of the ListView_SetExtendedListViewStyle or ListView_SetExtendedListViewStyleEx macros.

LVS_EX_CHECKBOXES
Version 4.70. Enables check boxes for items in a list view control. Effectively, when set to this style, the control will create and set a state image list using DrawFrameControl. Check boxes are visible and functional with all list view modes. The state of the check box for a given item is obtained using the ListView_GetCheckState macro.

Note: To set the state of the item checkbox, use the following macro.

#ifndef ListView_SetCheckState
   #define ListView_SetCheckState(hwndLV, i, fCheck) \
      ListView_SetItemState(hwndLV, i, \
      INDEXTOSTATEIMAGEMASK((fCheck)+1), LVIS_STATEIMAGEMASK)
#endif

LVS_EX_FLATSB
Version 4.71. Enables flat scroll bars in the list view. If you need more control over the appearance of the list view's scroll bars, you should manipulate the list view's scroll bars directly using the Flat Scroll Bar APIs.
LVS_EX_FULLROWSELECT
Version 4.70. When an item is selected, the item and all its subitems are highlighted. This style is available only in conjunction with the LVS_REPORT style.
LVS_EX_GRIDLINES
Version 4.70. Displays gridlines around items and subitems. This style is available only in conjunction with the LVS_REPORT style.
LVS_EX_HEADERDRAGDROP
Version 4.70. Enables drag-and-drop reordering of columns in a list view control. This style is only available to list view controls that use the LVS_REPORT style.
LVS_EX_INFOTIP
Version 4.71. When a list view control uses the LVS_EX_INFOTIP style, the LVN_GETINFOTIP notification message is sent to the parent window before displaying an item's tooltip.
LVS_EX_LABELTIP
Version 5.0. If a partially hidden label in any list view mode lacks tooltip text, the list view control will unfold the label. If this style is not set, the list view control will unfold partly hidden labels only for the large icon mode.
LVS_EX_MULTIWORKAREAS
Version 4.71. If the list view control has the LVS_AUTOARRANGE style, the control will not autoarrange its icons until one or more work areas are defined (see LVM_SETWORKAREAS). To be effective, this style must be set before any work areas are defined and any items have been added to the control.
LVS_EX_ONECLICKACTIVATE
Version 4.70. The list view control sends an LVN_ITEMACTIVATE notification message to the parent window when the user clicks an item. This style also enables hot tracking in the list view control. Hot tracking means that when the cursor moves over an item, it is highlighted but not selected. See the Remarks for a discussion of item activation.
LVS_EX_REGIONAL
Version 4.71. The list view will create a region that includes only the item icons and text and set its window region to that using SetWindowRgn. This will exclude any area that is not part of an item from the window region. This style is only available to list view controls that use the LVS_ICON style.
LVS_EX_SUBITEMIMAGES
Version 4.70. Allows images to be displayed for subitems. This style is available only in conjunction with the LVS_REPORT style.
LVS_EX_TRACKSELECT
Version 4.70. Enables hot-track selection in a list view control. Hot track selection means that an item is automatically selected when the cursor remains over the item for a certain period of time. The delay can be changed from the default system setting with a LVM_SETHOVERTIME message. This style applies to all styles of list view control. You can check whether or not hot-track selection is enabled by calling SystemParametersInfo.
LVS_EX_TWOCLICKACTIVATE   
Version 4.70. The list view control sends an LVN_ITEMACTIVATE notification message to the parent window when the user double-clicks an item. This style also enables hot tracking in the list view control. Hot tracking means that when the cursor moves over an item, it is highlighted but not selected. See the Remarks for a discussion of item activation.
LVS_EX_UNDERLINECOLD
Version 4.71. Causes non-hot items that are activatable to be displayed with underlined text. This style requires that LVS_EX_TWOCLICKACTIVATE also be set. See the Remarks for a discussion of item activation.
LVS_EX_UNDERLINEHOT
Version 4.71. Causes hot items that are activatable to be displayed with underlined text. This style requires that LVS_EX_ONECLICKACTIVATE or LVS_EX_TWOCLICKACTIVATE also be set. See the Remarks for a discussion of item activation.

Remarks

An item becomes hot when the mouse hovers over it. If hot-tracking is enabled, hot items will be highlighted, but the user must still click the item at least once to activate it. Activating an item causes the list view control to send an LVN_ITEMACTIVATE notification. An item is activatable when it is in a state where a single click will activate it.

If the LVS_EX_ONECLICKACTIVATE style is set, only one click is required to activate any item, so all items are activatable. If the LVS_EX_TWOCLICKACTIVATE style is set, two clicks are required to activate an item. With this style, the item becomes activatable only after it has been clicked once.

Setting the LVS_EX_UNDERLINEHOT style will cause the text of a hot activatable item to be underlined. Setting the LVS_EX_UNDERLINECOLD style will cause the text of items that are activatable but not hot to be underlined.

Month calendar control styles

The following are the styles used with month calendar controls.

MCS_DAYSTATE
Version 4.70. The month calendar will send MCN_GETDAYSTATE notifications to request information about which days should be displayed in bold. For more information about supporting this style, see Processing the MCN_GETDAYSTATE Notification Message.
MCS_MULTISELECT
Version 4.70. The month calendar will allow the user to select a range of dates within the control. By default, the maximum range is one week. You can change the maximum range that can be selected by using the MCM_SETMAXSELCOUNT message.
MCS_NOTODAY
Version 4.70. The month calendar control will not display the "today" date at the bottom of the control.
MCS_NOTODAYCIRCLE
Version 4.70. The month calendar control will not circle the "today" date.
MCS_WEEKNUMBERS
Version 4.70. The month calendar control will display week numbers (1-52) to the left of each row of days. Week 1 is defined as the first week that contains at least four days.

Pager Control Styles

The following window styles are used when creating pager controls.
PGS_AUTOSCROLL The pager control will scroll when the user hovers the mouse over one of the scroll buttons.
PGS_DRAGNDROP The contained window can be a drag-and-drop target. The pager control will automatically scroll if an item is dragged from outside the pager over one of the scroll buttons.
PGS_HORZ Creates a pager control that can be scrolled horizontally. This style and the PGS_VERT style are mutually exclusive and cannot be combined.
PGS_VERT Creates a pager control that can be scrolled vertically. This is the default direction if no direction style is specified. This style and the PGS_HORZ style are mutually exclusive and cannot be combined.

Progress Bar Control Styles

Progress bar controls now support control styles. You can set progress bar styles in the same way as other common controls ( CreateWindowEx, GetWindowLong, SetWindowLong). The following are the supported styles:
PBS_SMOOTH Version 4.70. The progress bar displays progress status in a smooth scrolling bar instead of the default segmented bar.
PBS_VERTICAL Version 4.70. The progress bar displays progress status vertically, from bottom to top.

Rebar Control Styles

Rebar controls support a variety of control styles in addition to standard window styles.
RBS_AUTOSIZE RCML Version 4.71. The rebar control will automatically change the layout of the bands when the size or position of the control changes. An RBN_AUTOSIZE notification will be sent when this occurs.
RBS_BANDBORDERS Version 4.70. The rebar control displays narrow lines to separate adjacent bands.
RBS_DBLCLKTOGGLE Version 4.71. The rebar band will toggle its maximized or minimized state when the user double-clicks on the band. Without this style, the maximized or minimized state is toggled when the user single-clicks on the band.
RBS_FIXEDORDER Version 4.70. The rebar control always displays bands in the same order. You can move bands to different rows, but the band order is static.
RBS_REGISTERDROP Version 4.71. The rebar control generates RBN_GETOBJECT notification messages when an object is dragged over a band in the control. To receive the RBN_GETOBJECT notifications, initialize OLE with a call to OleInitialize or CoInitialize.
RBS_TOOLTIPS Version 4.70. Not yet supported.
RBS_VARHEIGHT Version 4.70. The rebar control displays bands at the minimum required height, when possible. Without this style, the rebar control displays all bands at the same height, using the height of the tallest visible band to determine the height of other bands.
RBS_VERTICALGRIPPER   Version 4.71. The size grip will be displayed vertically instead of horizontally in a vertical rebar control. This style is ignored for rebar controls that do not have the CCS_VERT style.

Trackbar Control Styles

This section contains information about the styles used with trackbar controls.

TBS_AUTOTICKS
The trackbar control will have a tick mark for each increment in its range of values.
TBS_BOTH
The trackbar control will display tick marks on both sides of the control. This will be both top and bottom when used with TBS_HORZ or both left and right if used with TBS_VERT.
TBS_BOTTOM
The trackbar control will display tick marks below the control. This style is only valid with TBS_HORZ.
TBS_ENABLESELRANGE
The trackbar control can display a selection range only. The tick marks at the starting and ending positions of a selection range are displayed as triangles (instead of vertical dashes), and the selection range is highlighted.
TBS_FIXEDLENGTH
The trackbar control allows the size of the slider to be changed with the TBM_SETTHUMBLENGTH message.
TBS_HORZ
The trackbar control will be oriented vertically. This is the default orientation.
TBS_LEFT
The trackbar control will display tick marks to the left of the control. This style is only valid with TBS_VERT.
TBS_NOTHUMB
The trackbar control does not display a slider.
TBS_NOTICKS
The trackbar control will not display any tick marks.
TBS_REVERSED
Version 5.0. This style bit is used for "reversed" trackbars, where a smaller number indicates "higher" and a larger number indicates "lower". It has no effect on the control, but is simply a label that can be checked to determine whether a trackbar is normal or reversed.
TBS_RIGHT
The trackbar control will display tick marks to the right of the control. This style is only valid with TBS_VERT.
TBS_TOOLTIPS
Version 4.70. The trackbar control will support tooltips. When a trackbar control is created using this style, it automatically creates a default tooltip control that displays the slider's current position. You can change where the tooltips are displayed by using the TBM_SETTIPSIDE message.
TBS_TOP
The trackbar control will display tick marks above the control. This style is only valid with TBS_HORZ.
TBS_VERT
The trackbar control will be oriented vertically. This is the default orientation.

Tree View Control Window Styles

The following window styles are used when creating tree view controls.

TVS_CHECKBOXES
Version 4.70. Enables check boxes for items in a tree view control. Effectively, when set to this style, the control creates and sets a state image list using DrawFrameControl. For more information, see Working with state image indexes. Once the control is created with this style, it cannot be removed. If it is necessary to remove this style, the control must be destroyed and a new one created in its place.
TVS_DISABLEDRAGDROP
Prevents the tree view control from sending TVN_BEGINDRAG notification messages.
TVS_EDITLABELS
Allows the user to edit the labels of tree view items.
TVS_FULLROWSELECT
Version 4.71. Enables full-row selection in the tree view. The entire row of the selected item is highlighted, and clicking anywhere on an item's row will cause it to be selected. This style cannot be used in conjunction with the TVS_HASLINES style.
TVS_HASBUTTONS
Displays plus (+) and minus (-) buttons next to parent items. The user clicks the buttons to expand or collapse a parent item's list of child items. To include buttons with items at the root of the tree view, TVS_LINESATROOT must also be specified.
TVS_HASLINES
Uses lines to show the hierarchy of items.
TVS_INFOTIP
Version 4.71. The tree view control will send the TVN_GETINFOTIP notification to obtain tooltip information.
TVS_LINESATROOT
Uses lines to link items at the root of the tree view control. This value is ignored if TVS_HASLINES is not also specified.
TVS_NOHSCROLL
Version 5.00. Disables horizontal scrolling in the control. The control will not display any horizontal scroll bars.
TVS_NONEVENHEIGHT
Version 4.71. The height of the items can be set to an odd height with the TVM_SETITEMHEIGHT message. By default, the height of items must be an even value.
TVS_NOSCROLL
Version 4.71. Disables both horizontal and vertical scrolling in the control. The control will not display any scroll bars.
TVS_NOTOOLTIPS
Version 4.70. The tree view control does not support tooltips.
TVS_RTLREADING
Version 4.70. Normal windows display text left-to-right (LTR). Windows can be mirrored to display languages such as Hebrew or Arabic that read right-to-left (RTL). Normally, tree view text will be displayed in same direction as the the text in its parent window. If TVS_RTLREADING is set, tree view text will read in the opposite direction from the text in the parent window.
TVS_SHOWSELALWAYS
Causes a selected item to remain selected when the tree view control loses focus.
TVS_SINGLEEXPAND
Version 4.71. When this style is enabled, changing the selection in the tree view will automatically cause the item being selected to expand and the item being unselected to collapse. If the mouse is used to single-click the selected item and that item is closed, it will be expanded. If the user holds the CTRL key down while selecting an item, the item being unselected will not be collapsed.

Version 5.0. When this style is enabled, changing the selection will automatically cause the item being selected to collapse if it was expanded, or expand if it was collapsed. The unselected item will collapse. If the user holds the CTRL key down while selecting an item, the item being unselected will not be collapsed.

TVS_TRACKSELECT
Version 4.70. Enables hot tracking in a tree view control.

Up-Down Control Styles

The following styles are used when creating up-down controls:
UDS_ALIGNLEFT RCML Positions the up-down control next to the left edge of the buddy window. The buddy window is moved to the right, and its width is decreased to accommodate the width of the up-down control.
UDS_ALIGNRIGHT Positions the up-down control next to the right edge of the buddy window. The width of the buddy window is decreased to accommodate the width of the up-down control.
UDS_ARROWKEYS Causes the up-down control to increment and decrement the position when the UP ARROW and DOWN ARROW keys are pressed.
UDS_AUTOBUDDY Automatically selects the previous window in the z-order as the up-down control's buddy window.
UDS_HORZ Causes the up-down control's arrows to point left and right instead of up and down.
UDS_HOTTRACK The control will exhibit "hot tracking" behavior. That is, it will highlight the up and down arrows on the control as the pointer passes over them. This style requires Windows 98 or Windows NT 5. If the system is running Windows 95 or Windos NT 4, the flag is ignored. To check whether or not hot tracking is enabled, call SystemParametersInfo.
UDS_NOTHOUSANDS Does not insert a thousands separator between every three decimal digits.
UDS_SETBUDDYINT Causes the up-down control to set the text of the buddy window (using the WM_SETTEXT message) when the position changes. The text consists of the position formatted as a decimal or hexadecimal string.
UDS_WRAP Causes the position to "wrap" if it is incremented or decremented beyond the ending or beginning of the range.

 

 

Change History
Date
Changes Made
Program Manager
13 April Remembered to fill in this list FelixA
13 April Added the MFC style explanations FelixA
14 April Added the common controls. Explaining what RCML syntax to use for styles we support, and which styles we don't support. FelixA.
23 April Added RESIZE="AUTOMATIC/DIRECTED", and RELATIVE="YES/ control ID" as well as the WIDER and TALLER attributes to LOCATION.  
Appendices

For information on XML, click here