Commit 3a58b51a authored by Keith Stevens's avatar Keith Stevens Committed by Alexandre Julliard

comctl32: trackbar: Return the correct number of tics for TBM_GETNUMTICS.

parent de608991
......@@ -775,12 +775,10 @@ static void test_tic_settings(HWND hWndTrackbar){
SendMessage(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(0, 10));
SendMessage(hWndTrackbar, TBM_SETTICFREQ, 2, 0);
r = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0,0);
todo_wine{
expect(6, r);
SendMessage(hWndTrackbar, TBM_SETTICFREQ, 5, 0);
r = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0,0);
expect(3, r);
}
expect(6, r);
SendMessage(hWndTrackbar, TBM_SETTICFREQ, 5, 0);
r = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0,0);
expect(3, r);
SendMessage(hWndTrackbar, TBM_SETTICFREQ, 15, 0);
r = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0,0);
expect(2, r);
......
......@@ -1042,7 +1042,10 @@ TRACKBAR_GetNumTics (TRACKBAR_INFO *infoPtr)
if (GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_NOTICKS)
return 0;
return infoPtr->uNumTics + 2;
if(infoPtr->uNumTics == 0)
return 2;
else
return infoPtr->uNumTics + 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment