From 629eb23a11df48fadbfb5a8033e0edd633a5c36b Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 2 Sep 2009 21:06:08 +0400 Subject: [PATCH] comctl32/trackbar: TBM_SETTIC processing shouldn't be affected by TBS_AUTOTICKS style. --- dlls/comctl32/tests/trackbar.c | 16 ++++++++++------ dlls/comctl32/trackbar.c | 3 --- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dlls/comctl32/tests/trackbar.c b/dlls/comctl32/tests/trackbar.c index a200b91c9d6..cd4772bb260 100644 --- a/dlls/comctl32/tests/trackbar.c +++ b/dlls/comctl32/tests/trackbar.c @@ -786,18 +786,22 @@ static void test_thumb_length(HWND hWndTrackbar){ static void test_tic_settings(HWND hWndTrackbar){ int r; - flush_sequences(sequences, NUM_MSG_SEQUENCE); /* testing TBM_SETTIC */ /* Set tics at 5 and 10 */ /* 0 and 20 are out of range and should not be set */ + r = SendMessage(hWndTrackbar, TBM_GETRANGEMAX, 0, 0); + expect(10, r); + r = SendMessage(hWndTrackbar, TBM_GETRANGEMIN, 0, 0); + expect(5, r); + + flush_sequences(sequences, NUM_MSG_SEQUENCE); r = SendMessage(hWndTrackbar, TBM_SETTIC, 0, 0); ok(r == FALSE, "Expected FALSE, got %d\n", r); r = SendMessage(hWndTrackbar, TBM_SETTIC, 0, 5); - todo_wine{ - ok(r == TRUE, "Expected TRUE, got %d\n", r); - r = SendMessage(hWndTrackbar, TBM_SETTIC, 0, 10); - ok(r == TRUE, "Expected TRUE, got %d\n", r); - } + ok(r == TRUE, "Expected TRUE, got %d\n", r); + r = SendMessage(hWndTrackbar, TBM_SETTIC, 0, 10); + ok(r == TRUE, "Expected TRUE, got %d\n", r); + r = SendMessage(hWndTrackbar, TBM_SETTIC, 0, 20); ok(r == FALSE, "Expected False, got %d\n", r); diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index 5b0b87d9a7b..88f1df10b0a 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -1294,9 +1294,6 @@ TRACKBAR_SetThumbLength (TRACKBAR_INFO *infoPtr, UINT iLength) static inline LRESULT TRACKBAR_SetTic (TRACKBAR_INFO *infoPtr, LONG lPos) { - if (infoPtr->dwStyle & TBS_AUTOTICKS) - return FALSE; - if ((lPos < infoPtr->lRangeMin) || (lPos> infoPtr->lRangeMax)) return FALSE;