The circular slider PM window class WC_CIRCULARSLIDER is similar to the window class of a linear slider or a scroll bar. This window class must be registered with WinRegisterCircularSlider before you can create a circular slider. A circular slider can be created by a CONTROL statement in a dialog resource, as shown in the following figure:
CONTROL "~Balance",
ID_BALANCECS,
10, 50, 60, 60,
WC_CIRCULARSLIDER,
WS_TABSTOP |
WS_VISIBLE |
CSS_POINTSELECT
A circular slider also can be created by specifying the WC_CIRCULARSLIDER window class name as a parameter of the WinCreateWindow call, as shown in the following sample code:
hwndCS = WinCreateWindow (hwndClient, /* Parent handle */
WC_CIRCULARSLIDER, /* Class name */
"~Balance", /* Window text */
WS_VISIBLE |
WS_TABSTOP |
CSS_POINTSELECT,
0,0,0,0, /* Coordinates */
hwndClient, /* Owner handle */
HWND_TOP, /* Z-order */
ID_BALANCECS, /* Window ID */
NULL, /* Control data */
NULL); /* Presparam */