Commit 629eb23a authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/trackbar: TBM_SETTIC processing shouldn't be affected by TBS_AUTOTICKS style.

parent 5594a5f9
...@@ -786,18 +786,22 @@ static void test_thumb_length(HWND hWndTrackbar){ ...@@ -786,18 +786,22 @@ static void test_thumb_length(HWND hWndTrackbar){
static void test_tic_settings(HWND hWndTrackbar){ static void test_tic_settings(HWND hWndTrackbar){
int r; int r;
flush_sequences(sequences, NUM_MSG_SEQUENCE);
/* testing TBM_SETTIC */ /* testing TBM_SETTIC */
/* Set tics at 5 and 10 */ /* Set tics at 5 and 10 */
/* 0 and 20 are out of range and should not be set */ /* 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); r = SendMessage(hWndTrackbar, TBM_SETTIC, 0, 0);
ok(r == FALSE, "Expected FALSE, got %d\n", r); ok(r == FALSE, "Expected FALSE, got %d\n", r);
r = SendMessage(hWndTrackbar, TBM_SETTIC, 0, 5); r = SendMessage(hWndTrackbar, TBM_SETTIC, 0, 5);
todo_wine{
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); 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, 20); r = SendMessage(hWndTrackbar, TBM_SETTIC, 0, 20);
ok(r == FALSE, "Expected False, got %d\n", r); ok(r == FALSE, "Expected False, got %d\n", r);
......
...@@ -1294,9 +1294,6 @@ TRACKBAR_SetThumbLength (TRACKBAR_INFO *infoPtr, UINT iLength) ...@@ -1294,9 +1294,6 @@ TRACKBAR_SetThumbLength (TRACKBAR_INFO *infoPtr, UINT iLength)
static inline LRESULT static inline LRESULT
TRACKBAR_SetTic (TRACKBAR_INFO *infoPtr, LONG lPos) TRACKBAR_SetTic (TRACKBAR_INFO *infoPtr, LONG lPos)
{ {
if (infoPtr->dwStyle & TBS_AUTOTICKS)
return FALSE;
if ((lPos < infoPtr->lRangeMin) || (lPos> infoPtr->lRangeMax)) if ((lPos < infoPtr->lRangeMin) || (lPos> infoPtr->lRangeMax))
return FALSE; return FALSE;
......
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