1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
HWND CreateTrackBar(HWND * parent, UINT const & min, UINT const & max,
UINT const & minS, UINT const & maxS, HINSTANCE hInst,
int const & rcID)
{
HWND handle=CreateWindowEx(0, TRACKBAR_CLASS,
L"Scrolling Speed",
WS_CHILD | WS_VISIBLE |
TBS_AUTOTICKS | TBS_ENABLESELRANGE,
20, 20, 300, 30, *parent,
HMENU(rcID), hInst, NULL);
SendMessage(handle, TBM_SETRANGE, (WPARAM)TRUE,
(LPARAM) MAKELONG(min, max));
SendMessage(handle, TBM_SETPAGESIZE, 0, (LPARAM) 4);
SendMessage(handle, TBM_SETPOS, (WPARAM) TRUE, (LPARAM) minS);
SetFocus(handle);
return handle;
}
|