Common Control Styles

Though Windows CE supports some styles that apply to a broad spectrum of common controls, each of the common controls also has a set of styles that are unique to that control. Unless noted otherwise, these unique styles apply to header controls, toolbar controls, rebars, and status windows.

Common control styles supported by Windows CE are described in the following table.

Style Description
CCS_ADJUSTABLE Enables a toolbar's built-in customization features, which allow the user to drag a button to a new position or to remove a button by dragging it off the toolbar. In addition, the user can double-click the toolbar to display the Customize Toolbar dialog box, which allows the user to add, delete, and rearrange toolbar buttons.
CCS_BOTTOM Causes the control to position itself at the bottom of the parent window's client area and sets the width of the control to be the same as the parent window's width. Status windows have this style by default.
CCS_NODIVIDER Prevents a 2-pixel highlight from being drawn at the top of the control.
CCS_NOMOVEY Causes the control to resize and move itself horizontally, but not vertically, in response to a WM_SIZE message. Header windows have this style by default. This style does not apply if your control has the CCS_NORESIZE style.
CCS_NOPARENTALIGN Prevents the control from automatically moving to the top or bottom of the parent window. Instead, the control keeps its position within the parent window despite changes to the size of the parent. If the application also uses the CCS_TOP or CCS_BOTTOM styles, it adjusts the height to the default, but does not change the position and width of the control.
CCS_NORESIZE Prevents the control from using the default width and height when setting its initial size or a new size. Instead, the control uses the width and height specified in the request for creation or sizing.
CCS_TOP Causes the control to position itself at the top of the parent window's client area and matches the width of the control to the same width of the parent window. Toolbars have this style by default.
CCS_LEFT Causes the control to display vertically on the left side of the parent window.
CCS_RIGHT Causes the control to display vertically on the right side of the parent window.
CCS_NOMOVEX Causes the control to resize and move itself vertically, but not horizontally, in response to a WM_SIZE message. This message does not apply if your control has the CCS_NORESIZE style.
CCS_VERT Causes the control to display vertically.