The system-defined color value, COLOR_SCROLLBAR, controls the color within a scroll bar's shaft. Use the GetSysColor function to determine the color of the shaft and the SetSysColors function to set the color of the shaft. Note, however, that this change of color affects all scroll bars in the system.
You can get the dimensions of the bitmaps that the system uses in standard scroll bars by calling the GetSystemMetrics function. Following are the system metric values associated with scroll bars.
System metric | Description |
---|---|
SM_CXHSCROLL | Width of arrow bitmap on horizontal scroll bar |
SM_CXHTHUMB | Width of scroll box on horizontal scroll bar. This value retrieves the width a scroll bar that has a page size of zero. |
SM_CXVSCROLL | Width of arrow bitmap on vertical scroll bar |
SM_CYHSCROLL | Height of arrow bitmap on horizontal scroll bar |
SM_CYVSCROLL | Height of arrow bitmap on vertical scroll bar |
SM_CYVTHUMB | Height of scroll box on vertical scroll bar. This value retrieves the height of a scroll bar that has a page size of zero. |