[2/3] comctl32/trackbar: TBM_SETTIC processing shouldn't be affected by TBS_AUTOTICKS style

Nikolay Sivov bunglehead at gmail.com
Wed Sep 2 14:38:12 CDT 2009


Changelog:
    - TBM_SETTIC processing shouldn't be affected by TBS_AUTOTICKS style

>From b85b57c0e8e4a2d10503edada0b4db79b88fbe9e Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Wed, 2 Sep 2009 21:06:08 +0400
Subject: 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 a200b91..cd4772b 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 5b0b87d..88f1df1 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;
 
-- 
1.5.6.5







More information about the wine-patches mailing list