The Win32 application programming interface (API) offers several window styles that you can use when creating common controls. Table 1-2 lists and describes these styles. In general, you can combine styles when you create a new control, although Table 1-2 notes certain cases in which you cannot use a combination.
Style | Description |
CCS_ADJUSTABLE | Allows a toolbar to be configured by the user. |
CCS_BOTTOM | Positions the control at the bottom of its parent window's client area and sets the control width to the parent window width. Status bars have this style by default. |
CCS_NODIVIDER | Prevents a 2-pixel highlight from being drawn at the top of the control. |
CCS_NOHILITE | Prevents a 1-pixel highlight from being drawn at the top of the control. |
CCS_NOMOVEY | Resizes the control and moves it horizontally, but not vertically, in response to a WM_SIZE message. This style is ignored if the CCS_NORESIZE style is set. |
CCS_NOPARENTALIGN | Prevents the control from automatically moving to the top or bottom of the parent window. A control with this style maintains its position within the parent window even if the size of the parent window changes. If you specify the CCS_TOP or CCS_BOTTOM style with CCS_NOPARENTALIGN, the height of the control adjusts to the default, and the position and width of the control remain unchanged. |
CCS_NORESIZE | Prevents the control from using the default width and height when setting its initial size or a new size. A control with this style uses the width and height specified in the creation or sizing request. |
CCS_TOP | Positions the control at the top of the parent window's client area and sets the control width to the parent window width. Toolbars have this style by default. |
Table 1-2. Common control styles.