The system-defined color value, COLOR_SCROLLBAR, controls the color within a scroll bar's shaft. You can use the GetSysColor function to find out the color of the shaft. You can set the color of the shaft by using the SetSysColor function; however, be aware that the change effects all scroll bars in the system.
You can get the dimensions of the bitmaps that Windows uses in standard scroll bars by calling the GetSystemMetrics function. The system-metric values associated with scroll bars are described in the following list:
System metric | Description |
SM_CXHSCROLL | Width of arrow bitmap on horizontal scroll bar |
SM_CYHSCROLL | Height of arrow bitmap on horizontal scroll bar |
SM_CXVSCROLL | Width of arrow bitmap on vertical scroll bar |
SM_CYVSCROLL | Height of arrow bitmap on vertical scroll bar |
SM_CXHTHUMB | Width of scroll box on horizontal scroll bar |
SM_CYVTHUMB | Height of scroll box on vertical scroll bar |