ReactOS  0.4.13-dev-249-gcba1a2f
trackbar.c File Reference
#include <windows.h>
#include <commctrl.h>
#include <stdio.h>
#include "wine/test.h"
#include "msg.h"
#include "v6util.h"
Include dependency graph for trackbar.c:

Go to the source code of this file.

Macros

#define expect(expected, got)   ok(got == expected, "Expected %d, got %d\n", expected, got)
 
#define NUM_MSG_SEQUENCE   2
 
#define PARENT_SEQ_INDEX   0
 
#define TRACKBAR_SEQ_INDEX   1
 

Functions

static LRESULT WINAPI trackbar_no_wmpaint_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI parent_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static BOOL register_parent_wnd_class (void)
 
static HWND create_parent_window (void)
 
static LRESULT WINAPI trackbar_subclass_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static HWND create_trackbar (DWORD style, HWND parent)
 
static HWND create_trackbar2 (DWORD style, HWND parent)
 
static void test_trackbar_buddy (void)
 
static void test_line_size (void)
 
static void test_page_size (void)
 
static void test_position (void)
 
static void test_range (void)
 
static void test_selection (void)
 
static void test_thumb_length (void)
 
static void test_tic_settings (void)
 
static void test_tic_placement (void)
 
static void test_tool_tips (void)
 
static void test_unicode (void)
 
static void test_ignore_selection (void)
 
static void test_initial_state (void)
 
static void test_TBS_AUTOTICKS (void)
 
static void test_create (void)
 
 START_TEST (trackbar)
 

Variables

static const DWORD defaultstyle = WS_VISIBLE | TBS_TOOLTIPS | TBS_ENABLESELRANGE | TBS_FIXEDLENGTH | TBS_AUTOTICKS
 
static HWND hWndParent
 
static struct msg_sequencesequences [NUM_MSG_SEQUENCE]
 
static const struct message empty_seq []
 
static const struct message parent_create_trackbar_wnd_seq []
 
static const struct message parent_new_window_test_seq []
 
static const struct message buddy_window_test_seq []
 
static const struct message parent_buddy_window_test_seq []
 
static const struct message line_size_test_seq []
 
static const struct message page_size_test_seq []
 
static const struct message position_test_seq []
 
static const struct message parent_position_test_seq []
 
static const struct message range_test_seq []
 
static const struct message parent_range_test_seq []
 
static const struct message selection_test_seq []
 
static const struct message parent_selection_test_seq []
 
static const struct message tic_settings_test_seq []
 
static const struct message parent_tic_settings_test_seq []
 
static const struct message thumb_length_test_seq []
 
static const struct message parent_thumb_length_test_seq []
 
static const struct message tic_placement_test_seq []
 
static const struct message tool_tips_test_seq []
 
static const struct message unicode_test_seq []
 
static const struct message ignore_selection_test_seq []
 

Macro Definition Documentation

◆ expect

#define expect (   expected,
  got 
)    ok(got == expected, "Expected %d, got %d\n", expected, got)

Definition at line 28 of file trackbar.c.

◆ NUM_MSG_SEQUENCE

#define NUM_MSG_SEQUENCE   2

Definition at line 29 of file trackbar.c.

◆ PARENT_SEQ_INDEX

#define PARENT_SEQ_INDEX   0

Definition at line 30 of file trackbar.c.

◆ TRACKBAR_SEQ_INDEX

#define TRACKBAR_SEQ_INDEX   1

Definition at line 31 of file trackbar.c.

Function Documentation

◆ create_parent_window()

static HWND create_parent_window ( void  )
static

Definition at line 431 of file trackbar.c.

431  {
433  return NULL;
434 
435  return CreateWindowA("Trackbar test parent class", "Trackbar test parent window",
437  0, 0, 100, 100, GetDesktopWindow(), NULL, GetModuleHandleA(NULL), NULL);
438 }
static BOOL register_parent_wnd_class(void)
Definition: trackbar.c:415
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4184
smooth NULL
Definition: ftsmooth.c:416
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:622
#define WS_MAXIMIZEBOX
Definition: pedump.c:632
#define WS_CAPTION
Definition: pedump.c:624
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:819
#define WS_MINIMIZEBOX
Definition: pedump.c:631
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_SYSMENU
Definition: pedump.c:629

Referenced by START_TEST().

◆ create_trackbar()

static HWND create_trackbar ( DWORD  style,
HWND  parent 
)
static

Definition at line 460 of file trackbar.c.

460  {
461  HWND hWndTrack;
462  WNDPROC oldproc;
463  RECT rect;
464 
466  hWndTrack = CreateWindowA(TRACKBAR_CLASSA, "Trackbar Control", style,
467  rect.right, rect.bottom, 100, 50,
469 
470  if (!hWndTrack) return NULL;
471 
473  SetWindowLongPtrA(hWndTrack, GWLP_USERDATA, (LONG_PTR)oldproc);
474 
475  return hWndTrack;
476 }
static LRESULT WINAPI trackbar_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: trackbar.c:440
& rect
Definition: startmenu.cpp:1413
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4184
#define GWLP_USERDATA
Definition: treelist.c:63
smooth NULL
Definition: ftsmooth.c:416
r parent
Definition: btrfs.c:2677
#define SetWindowLongPtrA
Definition: winuser.h:5214
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:819
#define GWLP_WNDPROC
Definition: treelist.c:66
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2859
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define TRACKBAR_CLASSA
Definition: commctrl.h:1982
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
Arabic default style
Definition: afstyles.h:93

Referenced by test_create(), test_ignore_selection(), test_initial_state(), test_line_size(), test_page_size(), test_position(), test_range(), test_selection(), test_TBS_AUTOTICKS(), test_thumb_length(), test_tic_placement(), test_tic_settings(), test_tool_tips(), test_trackbar_buddy(), and test_unicode().

◆ create_trackbar2()

static HWND create_trackbar2 ( DWORD  style,
HWND  parent 
)
static

Definition at line 478 of file trackbar.c.

479 {
480  RECT rect;
482  return CreateWindowA(TRACKBAR_CLASSA, "Trackbar Control", style,
483  rect.right, rect.bottom, 100, 50,
485 }
& rect
Definition: startmenu.cpp:1413
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4184
smooth NULL
Definition: ftsmooth.c:416
r parent
Definition: btrfs.c:2677
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:819
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define TRACKBAR_CLASSA
Definition: commctrl.h:1982
Arabic default style
Definition: afstyles.h:93

Referenced by test_position(), and test_tic_settings().

◆ parent_wnd_proc()

static LRESULT WINAPI parent_wnd_proc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 384 of file trackbar.c.

384  {
385  static LONG defwndproc_counter = 0;
386  LRESULT ret;
387  struct message msg;
388 
389  /* log system messages, except for painting */
390  if (message < WM_USER &&
391  message != WM_PAINT &&
392  message != WM_ERASEBKGND &&
393  message != WM_NCPAINT &&
394  message != WM_NCHITTEST &&
395  message != WM_GETTEXT &&
396  message != WM_GETICON &&
398  {
399  msg.message = message;
400  msg.flags = sent|wparam|lparam;
401  if (defwndproc_counter) msg.flags |= defwinproc;
402  msg.wParam = wParam;
403  msg.lParam = lParam;
404  msg.id = 0;
406  }
407 
408  defwndproc_counter++;
410  defwndproc_counter--;
411 
412  return ret;
413 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
Definition: tftpd.h:59
#define WM_GETTEXT
Definition: winuser.h:1600
Definition: msg.h:39
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:5579
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
#define WM_NCHITTEST
Definition: winuser.h:1668
WPARAM wParam
Definition: combotst.c:138
#define WM_NCPAINT
Definition: winuser.h:1669
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
long LONG
Definition: pedump.c:60
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define WM_PAINT
Definition: winuser.h:1602
int ret
Definition: msg.h:34
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_USER
Definition: winuser.h:1856
#define add_message(msg)
Definition: msg.c:2142
#define WM_DEVICECHANGE
Definition: winuser.h:1787
#define msg(x)
Definition: auth_time.c:54
#define WM_ERASEBKGND
Definition: winuser.h:1607
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139
static UINT WPARAM wparam
Definition: combo.c:716

Referenced by register_parent_wnd_class().

◆ register_parent_wnd_class()

static BOOL register_parent_wnd_class ( void  )
static

Definition at line 415 of file trackbar.c.

415  {
416  WNDCLASSA cls;
417 
418  cls.style = 0;
420  cls.cbClsExtra = 0;
421  cls.cbWndExtra = 0;
423  cls.hIcon = 0;
424  cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
426  cls.lpszMenuName = NULL;
427  cls.lpszClassName = "Trackbar test parent class";
428  return RegisterClassA(&cls);
429 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
int cbClsExtra
Definition: winuser.h:3118
LPCSTR lpszMenuName
Definition: winuser.h:3124
#define WHITE_BRUSH
Definition: wingdi.h:901
HBRUSH hbrBackground
Definition: winuser.h:3123
int cbWndExtra
Definition: winuser.h:3119
HCURSOR hCursor
Definition: winuser.h:3122
smooth NULL
Definition: ftsmooth.c:416
const char * LPCSTR
Definition: xmlstorage.h:183
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:819
LPCSTR lpszClassName
Definition: winuser.h:3125
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2059
UINT style
Definition: winuser.h:3116
static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: trackbar.c:384
HINSTANCE hInstance
Definition: winuser.h:3120
WNDPROC lpfnWndProc
Definition: winuser.h:3117
#define IDC_ARROW
Definition: winuser.h:682
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
HICON hIcon
Definition: winuser.h:3121

Referenced by create_parent_window().

◆ START_TEST()

START_TEST ( trackbar  )

Definition at line 1350 of file trackbar.c.

1351 {
1352  ULONG_PTR cookie;
1353  HANDLE ctxt;
1354 
1355  LoadLibraryA("comctl32.dll");
1356 
1358 
1359  /* create parent window */
1361  ok(hWndParent != NULL, "Failed to create parent Window!\n");
1362 
1363  if(!hWndParent){
1364  skip("parent window not present\n");
1365  return;
1366  }
1367 
1368  test_create();
1370  test_line_size();
1371  test_page_size();
1372  test_position();
1373  test_range();
1374  test_selection();
1378  test_tool_tips();
1379  test_unicode();
1383 
1384  if (!load_v6_module(&cookie, &ctxt))
1385  return;
1386 
1388  test_line_size();
1389  test_page_size();
1390  test_position();
1391  test_range();
1392  test_selection();
1396  test_tool_tips();
1397  test_unicode();
1401 
1402  unload_v6_module(cookie, ctxt);
1403 
1405 }
static void test_page_size(void)
Definition: trackbar.c:572
static HWND create_parent_window(void)
Definition: trackbar.c:431
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
static void unload_v6_module(ULONG_PTR cookie, HANDLE hCtx)
Definition: v6util.h:63
static void test_trackbar_buddy(void)
Definition: trackbar.c:489
static void test_selection(void)
Definition: trackbar.c:859
BOOL WINAPI DestroyWindow(_In_ HWND)
static void test_thumb_length(void)
Definition: trackbar.c:931
uint32_t ULONG_PTR
Definition: typedefs.h:63
static void test_position(void)
Definition: trackbar.c:666
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
Definition: v6util.h:71
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
#define ok(value,...)
static void init_msg_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:391
smooth NULL
Definition: ftsmooth.c:416
static void test_unicode(void)
Definition: trackbar.c:1177
static void test_line_size(void)
Definition: trackbar.c:545
static void test_tic_placement(void)
Definition: trackbar.c:1082
static void test_range(void)
Definition: trackbar.c:739
static void test_TBS_AUTOTICKS(void)
Definition: trackbar.c:1285
static void test_ignore_selection(void)
Definition: trackbar.c:1203
static void test_create(void)
Definition: trackbar.c:1329
static void test_initial_state(void)
Definition: trackbar.c:1252
static void test_tool_tips(void)
Definition: trackbar.c:1126
static HWND hWndParent
Definition: trackbar.c:34
#define skip(...)
static void test_tic_settings(void)
Definition: trackbar.c:968

◆ test_create()

static void test_create ( void  )
static

Definition at line 1329 of file trackbar.c.

1330 {
1331  HWND hWndTrackbar;
1332 
1334 
1335  hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
1336  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
1337  ok_sequence(sequences, TRACKBAR_SEQ_INDEX, empty_seq, "create Trackbar Window", FALSE);
1339 
1340  DestroyWindow(hWndTrackbar);
1341 
1342  /* no style bits */
1344  hWndTrackbar = create_trackbar(0, hWndParent);
1345  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
1346  ok_sequence(sequences, PARENT_SEQ_INDEX, parent_new_window_test_seq, "new trackbar window test sequence", TRUE);
1347  DestroyWindow(hWndTrackbar);
1348 }
#define TRUE
Definition: types.h:120
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
static const DWORD defaultstyle
Definition: trackbar.c:33
BOOL WINAPI DestroyWindow(_In_ HWND)
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
static HWND hWndParent
Definition: trackbar.c:34
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
static const struct message empty_seq[]
Definition: trackbar.c:48
static const struct message parent_new_window_test_seq[]
Definition: trackbar.c:67
static const struct message parent_create_trackbar_wnd_seq[]
Definition: trackbar.c:52
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31

Referenced by START_TEST().

◆ test_ignore_selection()

static void test_ignore_selection ( void  )
static

Definition at line 1203 of file trackbar.c.

1204 {
1205  HWND hWndTrackbar;
1206  int r;
1207 
1208  hWndTrackbar = create_trackbar(0, hWndParent);
1209  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
1210 
1212  /* test TBM_SETSEL ensure that it is ignored */
1213  SendMessageA(hWndTrackbar, TBM_SETSEL, TRUE, MAKELONG(0,10));
1214  r = SendMessageA(hWndTrackbar, TBM_GETSELEND, 0,0);
1215  expect(0, r);
1216  r = SendMessageA(hWndTrackbar, TBM_GETSELSTART, 0,0);
1217  expect(0, r);
1218  SendMessageA(hWndTrackbar, TBM_SETSEL, FALSE, MAKELONG(0,10));
1219  r = SendMessageA(hWndTrackbar, TBM_GETSELEND, 0,0);
1220  expect(0, r);
1221  r = SendMessageA(hWndTrackbar, TBM_GETSELSTART, 0,0);
1222  expect(0, r);
1223 
1224  /* test TBM_SETSELEND, ensure that it is ignored */
1225  SendMessageA(hWndTrackbar, TBM_SETSELEND, TRUE, 0);
1226  r = SendMessageA(hWndTrackbar, TBM_GETSELEND, 0,0);
1227  expect(0, r);
1228  SendMessageA(hWndTrackbar, TBM_SETSELEND, TRUE, 10);
1229  r = SendMessageA(hWndTrackbar, TBM_GETSELEND, 0,0);
1230  expect(0,r);
1231  SendMessageA(hWndTrackbar, TBM_SETSELEND, FALSE, 0);
1232  r = SendMessageA(hWndTrackbar, TBM_GETSELEND, 0,0);
1233  expect(0, r);
1234 
1235  /* test TBM_SETSELSTART, ensure that it is ignored */
1236  SendMessageA(hWndTrackbar, TBM_SETSELSTART, TRUE, 0);
1237  r = SendMessageA(hWndTrackbar, TBM_GETSELSTART, 0,0);
1238  expect(0, r);
1239  SendMessageA(hWndTrackbar, TBM_SETSELSTART, TRUE, 10);
1240  r = SendMessageA(hWndTrackbar, TBM_GETSELSTART, 0,0);
1241  expect(0,r);
1242  SendMessageA(hWndTrackbar, TBM_SETSELSTART, FALSE, 0);
1243  r = SendMessageA(hWndTrackbar, TBM_GETSELSTART, 0,0);
1244  expect(0, r);
1245 
1246  ok_sequence(sequences, TRACKBAR_SEQ_INDEX, ignore_selection_test_seq, "ignore selection setting test sequence", FALSE);
1247  ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "parent ignore selection setting test sequence", FALSE);
1248 
1249  DestroyWindow(hWndTrackbar);
1250 }
#define TRUE
Definition: types.h:120
#define TBM_GETSELSTART
Definition: commctrl.h:2019
#define TBM_GETSELEND
Definition: commctrl.h:2020
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
BOOL WINAPI DestroyWindow(_In_ HWND)
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
#define ok(value,...)
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define TBM_SETSEL
Definition: commctrl.h:2013
#define TBM_SETSELEND
Definition: commctrl.h:2015
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
#define expect(expected, got)
Definition: trackbar.c:28
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
#define TBM_SETSELSTART
Definition: commctrl.h:2014
static HWND hWndParent
Definition: trackbar.c:34
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
static const struct message empty_seq[]
Definition: trackbar.c:48
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31
static const struct message ignore_selection_test_seq[]
Definition: trackbar.c:362

Referenced by START_TEST().

◆ test_initial_state()

static void test_initial_state ( void  )
static

Definition at line 1252 of file trackbar.c.

1253 {
1254  HWND hWnd;
1255  int ret;
1256 
1258 
1259  ret = SendMessageA(hWnd, TBM_GETNUMTICS, 0, 0);
1260  expect(2, ret);
1261  ret = SendMessageA(hWnd, TBM_GETTIC, 0, 0);
1262  expect(-1, ret);
1263  ret = SendMessageA(hWnd, TBM_GETTICPOS, 0, 0);
1264  expect(-1, ret);
1266  expect(0, ret);
1268  expect(100, ret);
1269 
1271  expect(0, ret);
1272 
1273  ret = SendMessageA(hWnd, TBM_GETNUMTICS, 0, 0);
1274  expect(2, ret);
1275 
1277  expect(0, ret);
1278 
1279  ret = SendMessageA(hWnd, TBM_GETNUMTICS, 0, 0);
1280  expect(2, ret);
1281 
1283 }
#define TRUE
Definition: types.h:120
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND hWnd
Definition: settings.c:17
#define TBM_GETRANGEMAX
Definition: commctrl.h:2005
BOOL WINAPI DestroyWindow(_In_ HWND)
#define TBM_SETRANGEMIN
Definition: commctrl.h:2010
#define TBM_SETRANGEMAX
Definition: commctrl.h:2011
#define TBM_GETRANGEMIN
Definition: commctrl.h:2004
#define expect(expected, got)
Definition: trackbar.c:28
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
int ret
#define TBM_GETTIC
Definition: commctrl.h:2006
static HWND hWndParent
Definition: trackbar.c:34
#define TBM_GETNUMTICS
Definition: commctrl.h:2018
#define TBM_GETTICPOS
Definition: commctrl.h:2017

Referenced by START_TEST().

◆ test_line_size()

static void test_line_size ( void  )
static

Definition at line 545 of file trackbar.c.

546 {
547  HWND hWndTrackbar;
548  int r;
549 
550  hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
551  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
552 
554 
555  /* test TBM_SETLINESIZE */
556  r = SendMessageA(hWndTrackbar, TBM_SETLINESIZE, 0, 10);
557  expect(1,r);
558  r = SendMessageA(hWndTrackbar, TBM_SETLINESIZE, 0, 4);
559  expect(10, r);
560 
561  /* test TBM_GETLINESIZE */
562  r = SendMessageA(hWndTrackbar, TBM_GETLINESIZE, 0,0);
563  expect(4, r);
564 
565  ok_sequence(sequences, TRACKBAR_SEQ_INDEX, line_size_test_seq, "linesize test sequence", FALSE);
566  ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "parent line test sequence", FALSE);
567 
568  DestroyWindow(hWndTrackbar);
569 }
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
static const DWORD defaultstyle
Definition: trackbar.c:33
BOOL WINAPI DestroyWindow(_In_ HWND)
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
#define TBM_GETLINESIZE
Definition: commctrl.h:2026
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
#define expect(expected, got)
Definition: trackbar.c:28
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
static HWND hWndParent
Definition: trackbar.c:34
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
static const struct message empty_seq[]
Definition: trackbar.c:48
static const struct message line_size_test_seq[]
Definition: trackbar.c:108
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31
#define TBM_SETLINESIZE
Definition: commctrl.h:2025

Referenced by START_TEST().

◆ test_page_size()

static void test_page_size ( void  )
static

Definition at line 572 of file trackbar.c.

573 {
574  HWND hWndTrackbar;
575  int r;
576 
577  hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
578  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
579 
580  r = SendMessageA(hWndTrackbar, TBM_GETPAGESIZE, 0, 0);
581  ok(r == 20, "Unexpected page size %d.\n", r);
582 
583  SendMessageA(hWndTrackbar, TBM_SETRANGE, 0, MAKELPARAM(0, 65));
584 
585  r = SendMessageA(hWndTrackbar, TBM_GETPAGESIZE, 0, 0);
586  ok(r == 13, "Unexpected page size %d.\n", r);
587 
588  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, 0, 10);
589 
590  r = SendMessageA(hWndTrackbar, TBM_GETPAGESIZE, 0, 0);
591  ok(r == 11, "Unexpected page size %d.\n", r);
592 
593  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, 0, 50);
594 
595  r = SendMessageA(hWndTrackbar, TBM_GETPAGESIZE, 0, 0);
596  ok(r == 8, "Unexpected page size %d.\n", r);
597 
598  r = SendMessageA(hWndTrackbar, TBM_SETPAGESIZE, 0, 10);
599  ok(r == 8, "Unexpected page size %d.\n", r);
600 
601  SendMessageA(hWndTrackbar, TBM_SETRANGE, 0, MAKELPARAM(0, 30));
602 
603  r = SendMessageA(hWndTrackbar, TBM_GETPAGESIZE, 0, 0);
604  ok(r == 10, "Unexpected page size %d.\n", r);
605 
606  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, 0, 5);
607 
608  r = SendMessageA(hWndTrackbar, TBM_GETPAGESIZE, 0, 0);
609  ok(r == 10, "Unexpected page size %d.\n", r);
610 
611  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, 0, 40);
612 
613  r = SendMessageA(hWndTrackbar, TBM_GETPAGESIZE, 0, 0);
614  ok(r == 10, "Unexpected page size %d.\n", r);
615 
616  r = SendMessageA(hWndTrackbar, TBM_SETPAGESIZE, 0, -1);
617  ok(r == 10, "Unexpected page size %d.\n", r);
618 
619  r = SendMessageA(hWndTrackbar, TBM_GETPAGESIZE, 0, 0);
620  ok(r == 7, "Unexpected page size %d.\n", r);
621 
622  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, 0, 100);
623 
624  r = SendMessageA(hWndTrackbar, TBM_GETPAGESIZE, 0, 0);
625  ok(r == 19, "Unexpected page size %d.\n", r);
626 
627  DestroyWindow(hWndTrackbar);
628 
629  hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
630  ok(hWndTrackbar != NULL, "Failed to create trackbar window.\n");
631 
633 
634  /* test TBM_SETPAGESIZE */
635  r = SendMessageA(hWndTrackbar, TBM_SETPAGESIZE, 0, 10);
636  expect(20, r);
637  r = SendMessageA(hWndTrackbar, TBM_SETPAGESIZE, 0, -1);
638  expect(10, r);
639 
640  /* test TBM_GETPAGESIZE */
641  r = SendMessageA(hWndTrackbar, TBM_GETPAGESIZE, 0,0);
642  expect(20, r);
643 
644  ok_sequence(sequences, TRACKBAR_SEQ_INDEX, page_size_test_seq, "page size test sequence", FALSE);
645  ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "parent page size test sequence", FALSE);
646 
647  /* check for zero page size */
648  r = SendMessageA(hWndTrackbar, TBM_SETPAGESIZE, 0, 0);
649  expect(20, r);
650  r = SendMessageA(hWndTrackbar, TBM_GETPAGESIZE, 0, 0);
651  expect(0, r);
652  /* revert to default */
653  r = SendMessageA(hWndTrackbar, TBM_SETPAGESIZE, 0, -1);
654  expect(0, r);
655  r = SendMessageA(hWndTrackbar, TBM_GETPAGESIZE, 0, 0);
656  expect(20, r);
657  /* < -1 */
658  r = SendMessageA(hWndTrackbar, TBM_SETPAGESIZE, 0, -2);
659  expect(20, r);
660  r = SendMessageA(hWndTrackbar, TBM_GETPAGESIZE, 0, 0);
661  expect(-2, r);
662 
663  DestroyWindow(hWndTrackbar);
664 }
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define MAKELPARAM(l, h)
Definition: winuser.h:3915
#define TBM_SETRANGE
Definition: commctrl.h:2009
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
static const DWORD defaultstyle
Definition: trackbar.c:33
BOOL WINAPI DestroyWindow(_In_ HWND)
#define TBM_SETRANGEMIN
Definition: commctrl.h:2010
#define TBM_SETRANGEMAX
Definition: commctrl.h:2011
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
#define ok(value,...)
#define TBM_SETPAGESIZE
Definition: commctrl.h:2023
smooth NULL
Definition: ftsmooth.c:416
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
#define expect(expected, got)
Definition: trackbar.c:28
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
static const struct message page_size_test_seq[]
Definition: trackbar.c:115
static HWND hWndParent
Definition: trackbar.c:34
#define TBM_GETPAGESIZE
Definition: commctrl.h:2024
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
static const struct message empty_seq[]
Definition: trackbar.c:48
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31

Referenced by START_TEST().

◆ test_position()

static void test_position ( void  )
static

Definition at line 666 of file trackbar.c.

667 {
668  HWND hWndTrackbar;
669  RECT rect, rect2;
670  WNDPROC oldproc;
671  int r;
672 
673  hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
674  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
675 
677 
678  /* test TBM_SETPOS */
679  SendMessageA(hWndTrackbar, TBM_SETPOS, TRUE, -1);
680  r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0);
681  expect(0, r);
682  SendMessageA(hWndTrackbar, TBM_SETPOS, TRUE, 5);
683  r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0,0);
684  expect(5, r);
685  SendMessageA(hWndTrackbar, TBM_SETPOS, TRUE, 5);
686  SendMessageA(hWndTrackbar, TBM_SETPOS, TRUE, 1000);
687  r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0,0);
688  expect(100, r);
689  SendMessageA(hWndTrackbar, TBM_SETPOS, FALSE, 20);
690  r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0,0);
691  expect(20, r);
692  SendMessageA(hWndTrackbar, TBM_SETPOS, TRUE, 20);
693 
694  /* test TBM_GETPOS */
695  r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0,0);
696  expect(20, r);
697 
698  ok_sequence(sequences, TRACKBAR_SEQ_INDEX, position_test_seq, "position test sequence", TRUE);
699  ok_sequence(sequences, PARENT_SEQ_INDEX, parent_position_test_seq, "parent position test sequence", TRUE);
700 
701  DestroyWindow(hWndTrackbar);
702 
703  hWndTrackbar = create_trackbar2(defaultstyle, hWndParent);
704  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
705 
706  /* subclassing procedure blocks WM_PAINT */
708  SetWindowLongPtrA(hWndTrackbar, GWLP_USERDATA, (LONG_PTR)oldproc);
709 
710  SetRectEmpty(&rect);
712 
713  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect);
714 
715  /* without repaint */
716  SendMessageA(hWndTrackbar, TBM_SETPOS, FALSE, 25);
717  r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0);
718  ok(r == 25, "got %d\n", r);
719  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect2);
720  ok(rect.left == rect2.left, "got %d\n", rect.left);
721 
722  /* with repaint */
723  SendMessageA(hWndTrackbar, TBM_SETPOS, TRUE, 30);
724  r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0);
725  ok(r == 30, "got %d\n", r);
726  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect2);
727  ok(rect.left != rect2.left, "got %d, expected %d\n", rect2.left, rect.left);
728 
729  /* now move it with keys */
730  SendMessageA(hWndTrackbar, WM_KEYDOWN, VK_END, 0);
731  r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0);
732  ok(r == 100, "got %d\n", r);
733  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect);
734  ok(rect.left != rect2.left, "got %d, expected %d\n", rect.left, rect2.left);
735 
736  DestroyWindow(hWndTrackbar);
737 }
RECT rect2
Definition: edittest.c:51
#define TRUE
Definition: types.h:120
static const struct message parent_position_test_seq[]
Definition: trackbar.c:140
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
#define TBM_SETPOS
Definition: commctrl.h:2008
LONG left
Definition: windef.h:291
static const DWORD defaultstyle
Definition: trackbar.c:33
BOOL WINAPI DestroyWindow(_In_ HWND)
& rect
Definition: startmenu.cpp:1413
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
#define TBM_GETPOS
Definition: commctrl.h:2003
#define ok(value,...)
#define GWLP_USERDATA
Definition: treelist.c:63
smooth NULL
Definition: ftsmooth.c:416
#define WM_KEYDOWN
Definition: winuser.h:1691
LONG_PTR LPARAM
Definition: windef.h:208
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
#define expect(expected, got)
Definition: trackbar.c:28
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
#define SetWindowLongPtrA
Definition: winuser.h:5214
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
static HWND create_trackbar2(DWORD style, HWND parent)
Definition: trackbar.c:478
#define GWLP_WNDPROC
Definition: treelist.c:66
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2859
static HWND hWndParent
Definition: trackbar.c:34
static LRESULT WINAPI trackbar_no_wmpaint_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: trackbar.c:36
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define TBM_GETTHUMBRECT
Definition: commctrl.h:2027
static const struct message position_test_seq[]
Definition: trackbar.c:122
#define VK_END
Definition: winuser.h:2176
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31

Referenced by START_TEST().

◆ test_range()

static void test_range ( void  )
static

Definition at line 739 of file trackbar.c.

740 {
741  HWND hWndTrackbar;
742  RECT rect1, rect2;
743  int r;
744 
745  hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
746  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
747 
749 
750  /* test TBM_SETRANGE */
751  SendMessageA(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(0, 10));
752  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMAX, 0,0);
753  expect(10, r);
754  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMIN, 0,0);
755  expect(0, r);
756  SendMessageA(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(-1, 1000));
757  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMAX, 0,0);
758  expect(1000, r);
759  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMIN, 0,0);
760  expect(-1, r);
761  SendMessageA(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(10, 0));
762  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMAX, 0,0);
763  expect(0, r);
764  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMIN, 0,0);
765  expect(10, r);
766  SendMessageA(hWndTrackbar, TBM_SETRANGE, FALSE, MAKELONG(0,10));
767  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMAX, 0,0);
768  expect(10, r);
769  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMIN, 0,0);
770  expect(0, r);
771 
772  /*test TBM_SETRANGEMAX */
773  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, TRUE, 10);
774  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMAX, 0,0);
775  expect(10, r);
776  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, TRUE, -1);
777  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMAX, 0,0);
778  expect(-1, r);
779  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, FALSE, 10);
780  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMAX, 0,0);
781  expect(10, r);
782 
783  /* testing TBM_SETRANGEMIN */
784  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, TRUE, 0);
785  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMIN, 0,0);
786  expect(0, r);
787  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, TRUE, 10);
788  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMIN, 0,0);
789  expect(10, r);
790  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, TRUE, -10);
791  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMIN, 0,0);
792  expect(-10, r);
793  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, FALSE, 5);
794  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMIN, 0,0);
795  expect(5, r);
796 
797  /* test TBM_GETRANGEMAX */
798  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMAX, 0,0);
799  expect(10, r);
800 
801  /* test TBM_GETRANGEMIN */
802  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMIN, 0,0);
803  expect(5, r);
804 
805  ok_sequence(sequences, TRACKBAR_SEQ_INDEX, range_test_seq, "range test sequence", TRUE);
806  ok_sequence(sequences, PARENT_SEQ_INDEX, parent_range_test_seq, "parent range test sequence", TRUE);
807 
808  /* TBM_SETRANGE updates thumb visual position (rectangle) if needed */
809  r = SendMessageA(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(-10, 0));
810  ok(r == 0, "got %d\n", r);
811  SendMessageA(hWndTrackbar, TBM_SETPOS, TRUE, 0);
812 
813  RedrawWindow(hWndTrackbar, NULL, 0, RDW_UPDATENOW);
814  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect1);
815 
816  r = SendMessageA(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(-10, 10));
817  ok(r == 0, "got %d\n", r);
818  RedrawWindow(hWndTrackbar, NULL, 0, RDW_UPDATENOW);
819 
820  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect2);
821  ok(!EqualRect(&rect1, &rect2), "thumb rectangle not updated\n");
822 
823  /* change range back, don't force repaint */
824  r = SendMessageA(hWndTrackbar, TBM_SETRANGE, FALSE, MAKELONG(-10, 0));
825  ok(r == 0, "got %d\n", r);
826 
827  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect1);
828  ok(EqualRect(&rect1, &rect2), "thumb rectangle not updated\n");
829 
830  /* test position update on range change */
831 
832  /* set to [20, 50], position at 30, reduce range to [20,25] */
833  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, FALSE, 20);
834  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, FALSE, 50);
835  SendMessageA(hWndTrackbar, TBM_SETPOS, FALSE, 30);
836  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, FALSE, 25);
837  r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0);
838  ok(r == 25, "Unexpected position %d\n", r);
839 
840  /* set to [20, 50], position at 30, flip max to 10 */
841  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, FALSE, 20);
842  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, FALSE, 50);
843  SendMessageA(hWndTrackbar, TBM_SETPOS, FALSE, 30);
844  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, FALSE, 10);
845  r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0);
846  ok(r == 20, "Unexpected position %d\n", r);
847 
848  /* set to [20, 50], position at 30, flip min to 70 */
849  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, FALSE, 20);
850  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, FALSE, 50);
851  SendMessageA(hWndTrackbar, TBM_SETPOS, FALSE, 30);
852  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, FALSE, 70);
853  r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0);
854  ok(r == 70, "Unexpected position %d\n", r);
855 
856  DestroyWindow(hWndTrackbar);
857 }
RECT rect2
Definition: edittest.c:51
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
#define TRUE
Definition: types.h:120
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define TBM_SETRANGE
Definition: commctrl.h:2009
#define TBM_GETRANGEMAX
Definition: commctrl.h:2005
static const struct message parent_range_test_seq[]
Definition: trackbar.c:190
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
#define TBM_SETPOS
Definition: commctrl.h:2008
static const DWORD defaultstyle
Definition: trackbar.c:33
BOOL WINAPI DestroyWindow(_In_ HWND)
#define TBM_SETRANGEMIN
Definition: commctrl.h:2010
#define TBM_SETRANGEMAX
Definition: commctrl.h:2011
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
#define TBM_GETPOS
Definition: commctrl.h:2003
#define ok(value,...)
#define TBM_GETRANGEMIN
Definition: commctrl.h:2004
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
#define expect(expected, got)
Definition: trackbar.c:28
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
static HWND hWndParent
Definition: trackbar.c:34
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
#define TBM_GETTHUMBRECT
Definition: commctrl.h:2027
#define RDW_UPDATENOW
Definition: winuser.h:1206
static const struct message range_test_seq[]
Definition: trackbar.c:150
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31

Referenced by START_TEST().

◆ test_selection()

static void test_selection ( void  )
static

Definition at line 859 of file trackbar.c.

860 {
861  HWND hWndTrackbar;
862  int r;
863 
864  hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
865  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
866 
867  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, FALSE, 5);
868  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, FALSE, 10);
869 
871 
872  /* test TBM_SETSEL */
873  SendMessageA(hWndTrackbar, TBM_SETSEL, TRUE, MAKELONG(0,10));
874  r = SendMessageA(hWndTrackbar, TBM_GETSELEND, 0,0);
875  expect(10, r);
876  r = SendMessageA(hWndTrackbar, TBM_GETSELSTART, 0,0);
877  expect(5, r);
878  SendMessageA(hWndTrackbar, TBM_SETSEL, TRUE, MAKELONG(5, 20));
879  r = SendMessageA(hWndTrackbar, TBM_GETSELEND, 0,0);
880  expect(10, r);
881  r = SendMessageA(hWndTrackbar, TBM_GETSELSTART, 0,0);
882  expect(5, r);
883  SendMessageA(hWndTrackbar, TBM_SETSEL, FALSE, MAKELONG(5, 10));
884  r = SendMessageA(hWndTrackbar, TBM_GETSELEND, 0,0);
885  expect(10, r);
886  r = SendMessageA(hWndTrackbar, TBM_GETSELSTART, 0,0);
887  expect(5, r);
888 
889  /* test TBM_SETSELEND */
890  SendMessageA(hWndTrackbar, TBM_SETSELEND, TRUE, 10);
891  r = SendMessageA(hWndTrackbar, TBM_GETSELEND, 0,0);
892  expect(10, r);
893  SendMessageA(hWndTrackbar, TBM_SETSELEND, TRUE, 20);
894  r = SendMessageA(hWndTrackbar, TBM_GETSELEND, 0,0);
895  expect(10, r);
896  SendMessageA(hWndTrackbar, TBM_SETSELEND, TRUE, 4);
897  r = SendMessageA(hWndTrackbar, TBM_GETSELEND, 0,0);
898  expect(4, r);
899  SendMessageA(hWndTrackbar, TBM_SETSELEND, FALSE, 2);
900  r = SendMessageA(hWndTrackbar, TBM_GETSELEND, 0,0);
901  expect(2, r);
902 
903  /* test TBM_GETSELEND */
904  r = SendMessageA(hWndTrackbar, TBM_GETSELEND, 0,0);
905  expect(2, r);
906 
907  /* testing TBM_SETSELSTART */
908  SendMessageA(hWndTrackbar, TBM_SETSELSTART, TRUE, 5);
909  r = SendMessageA(hWndTrackbar, TBM_GETSELSTART, 0,0);
910  expect(5, r);
911  SendMessageA(hWndTrackbar, TBM_SETSELSTART, TRUE, 0);
912  r = SendMessageA(hWndTrackbar, TBM_GETSELSTART, 0,0);
913  expect(5, r);
914  SendMessageA(hWndTrackbar, TBM_SETSELSTART, TRUE, 20);
915  r = SendMessageA(hWndTrackbar, TBM_GETSELSTART, 0,0);
916  expect(20, r);
917  SendMessageA(hWndTrackbar, TBM_SETSELSTART, FALSE, 8);
918  r = SendMessageA(hWndTrackbar, TBM_GETSELSTART, 0,0);
919  expect(8, r);
920 
921  /* test TBM_GETSELSTART */
922  r = SendMessageA(hWndTrackbar, TBM_GETSELSTART, 0,0);
923  expect(8, r);
924 
925  ok_sequence(sequences, TRACKBAR_SEQ_INDEX, selection_test_seq, "selection test sequence", TRUE);
926  ok_sequence(sequences, PARENT_SEQ_INDEX, parent_selection_test_seq, "parent selection test sequence", TRUE);
927 
928  DestroyWindow(hWndTrackbar);
929 }
#define TRUE
Definition: types.h:120
#define TBM_GETSELSTART
Definition: commctrl.h:2019
#define TBM_GETSELEND
Definition: commctrl.h:2020
static const struct message parent_selection_test_seq[]
Definition: trackbar.c:249
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
static const DWORD defaultstyle
Definition: trackbar.c:33
BOOL WINAPI DestroyWindow(_In_ HWND)
#define TBM_SETRANGEMIN
Definition: commctrl.h:2010
#define TBM_SETRANGEMAX
Definition: commctrl.h:2011
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
#define ok(value,...)
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define TBM_SETSEL
Definition: commctrl.h:2013
#define TBM_SETSELEND
Definition: commctrl.h:2015
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
#define expect(expected, got)
Definition: trackbar.c:28
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
#define TBM_SETSELSTART
Definition: commctrl.h:2014
static HWND hWndParent
Definition: trackbar.c:34
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
static const struct message selection_test_seq[]
Definition: trackbar.c:210
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31

Referenced by START_TEST().

◆ test_TBS_AUTOTICKS()

static void test_TBS_AUTOTICKS ( void  )
static

Definition at line 1285 of file trackbar.c.

1286 {
1287  HWND hWnd;
1288  int ret;
1289 
1291 
1292  ret = SendMessageA(hWnd, TBM_GETNUMTICS, 0, 0);
1293  expect(2, ret);
1294  ret = SendMessageA(hWnd, TBM_GETTIC, 0, 0);
1295  expect(-1, ret);
1296  ret = SendMessageA(hWnd, TBM_GETTICPOS, 0, 0);
1297  expect(-1, ret);
1299  expect(0, ret);
1301  expect(100, ret);
1302 
1303  /* TBM_SETRANGEMAX rebuilds tics */
1305  expect(0, ret);
1306  ret = SendMessageA(hWnd, TBM_GETNUMTICS, 0, 0);
1307  expect(201, ret);
1308 
1309  /* TBM_SETRANGEMIN rebuilds tics */
1311  expect(0, ret);
1313  expect(0, ret);
1314  ret = SendMessageA(hWnd, TBM_GETNUMTICS, 0, 0);
1315  expect(91, ret);
1316 
1318  expect(0, ret);
1319 
1320  /* TBM_SETRANGE rebuilds tics */
1321  ret = SendMessageA(hWnd, TBM_SETRANGE, TRUE, MAKELONG(10, 200));
1322  expect(0, ret);
1323  ret = SendMessageA(hWnd, TBM_GETNUMTICS, 0, 0);
1324  expect(191, ret);
1325 
1327 }
#define TRUE
Definition: types.h:120
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define TBM_SETRANGE
Definition: commctrl.h:2009
HWND hWnd
Definition: settings.c:17
#define TBM_GETRANGEMAX
Definition: commctrl.h:2005
BOOL WINAPI DestroyWindow(_In_ HWND)
#define TBM_SETRANGEMIN
Definition: commctrl.h:2010
#define TBM_SETRANGEMAX
Definition: commctrl.h:2011
#define TBM_GETRANGEMIN
Definition: commctrl.h:2004
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define TBS_AUTOTICKS
Definition: commctrl.h:1987
#define expect(expected, got)
Definition: trackbar.c:28
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
int ret
#define TBM_GETTIC
Definition: commctrl.h:2006
static HWND hWndParent
Definition: trackbar.c:34
#define TBM_GETNUMTICS
Definition: commctrl.h:2018
#define TBM_GETTICPOS
Definition: commctrl.h:2017

Referenced by START_TEST().

◆ test_thumb_length()

static void test_thumb_length ( void  )
static

Definition at line 931 of file trackbar.c.

932 {
933  HWND hWndTrackbar;
934  int r;
935 
936  hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
937  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
938 
940 
941  /* testing TBM_SETTHUMBLENGTH */
942  SendMessageA(hWndTrackbar, TBM_SETTHUMBLENGTH, 15, 0);
943  r = SendMessageA(hWndTrackbar, TBM_GETTHUMBLENGTH, 0,0);
944  expect(15, r);
945  SendMessageA(hWndTrackbar, TBM_SETTHUMBLENGTH, 20, 0);
946  r = SendMessageA(hWndTrackbar, TBM_GETTHUMBLENGTH, 0,0);
947  expect(20, r);
948 
949  /* test TBM_GETTHUMBLENGTH */
950  r = SendMessageA(hWndTrackbar, TBM_GETTHUMBLENGTH, 0,0);
951  expect(20, r);
952 
953  r = SendMessageA(hWndTrackbar, WM_SIZE, 0,0);
954  expect(0, r);
955  r = SendMessageA(hWndTrackbar, TBM_GETTHUMBLENGTH, 0,0);
956  expect(20, r);
957  r = SendMessageA(hWndTrackbar, WM_SIZE, 0, MAKELPARAM(50, 50) );
958  expect(0, r);
959  r = SendMessageA(hWndTrackbar, TBM_GETTHUMBLENGTH, 0,0);
960  expect(20, r);
961 
962  ok_sequence(sequences, TRACKBAR_SEQ_INDEX, thumb_length_test_seq, "thumb length test sequence", TRUE);
963  ok_sequence(sequences, PARENT_SEQ_INDEX, parent_thumb_length_test_seq, "parent thumb length test sequence", TRUE);
964 
965  DestroyWindow(hWndTrackbar);
966 }
#define TBM_GETTHUMBLENGTH
Definition: commctrl.h:2030
#define TRUE
Definition: types.h:120
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define MAKELPARAM(l, h)
Definition: winuser.h:3915
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
static const DWORD defaultstyle
Definition: trackbar.c:33
BOOL WINAPI DestroyWindow(_In_ HWND)
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define WM_SIZE
Definition: winuser.h:1593
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
#define expect(expected, got)
Definition: trackbar.c:28
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
#define TBM_SETTHUMBLENGTH
Definition: commctrl.h:2029
static HWND hWndParent
Definition: trackbar.c:34
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
static const struct message thumb_length_test_seq[]
Definition: trackbar.c:301
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31
static const struct message parent_thumb_length_test_seq[]
Definition: trackbar.c:318

Referenced by START_TEST().

◆ test_tic_placement()

static void test_tic_placement ( void  )
static

Definition at line 1082 of file trackbar.c.

1083 {
1084  HWND hWndTrackbar;
1085  int r;
1086  DWORD *rPTics;
1087  DWORD numtics;
1088 
1089  hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
1090  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
1091 
1092  SendMessageA(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(1, 6));
1093  SendMessageA(hWndTrackbar, TBM_SETTICFREQ, 1, 0);
1094 
1095  numtics = SendMessageA(hWndTrackbar, TBM_GETNUMTICS, 0, 0);
1096  ok(numtics == 6, "Expected 6, got %d\n", numtics);
1097 
1099  /* test TBM_GETPTICS */
1100  rPTics = (DWORD *) SendMessageA(hWndTrackbar, TBM_GETPTICS, 0,0);
1101  expect(2, rPTics[0]);
1102  expect(3, rPTics[1]);
1103  expect(4, rPTics[2]);
1104  expect(5, rPTics[3]);
1105 
1106  /* test TBM_GETTIC */
1107  r = SendMessageA(hWndTrackbar, TBM_GETTIC, 0,0);
1108  expect(2, r);
1109  r = SendMessageA(hWndTrackbar, TBM_GETTIC, 2,0);
1110  expect(4, r);
1111  r = SendMessageA(hWndTrackbar, TBM_GETTIC, 4,0);
1112  expect(-1, r);
1113 
1114  /* test TBM_GETTICPIC */
1115  r = SendMessageA(hWndTrackbar, TBM_GETTICPOS, 0, 0);
1116  ok(r > 0, "Expected r > 0, got %d\n", r);
1117  r = SendMessageA(hWndTrackbar, TBM_GETTICPOS, 2, 0);
1118  ok(r > 0, "Expected r > 0, got %d\n", r);
1119 
1120  ok_sequence(sequences, TRACKBAR_SEQ_INDEX, tic_placement_test_seq, "get tic placement test sequence", FALSE);
1121  ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "parent get tic placement test sequence", FALSE);
1122 
1123  DestroyWindow(hWndTrackbar);
1124 }
#define TRUE
Definition: types.h:120
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define TBM_SETRANGE
Definition: commctrl.h:2009
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
static const struct message tic_placement_test_seq[]
Definition: trackbar.c:330
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
static const DWORD defaultstyle
Definition: trackbar.c:33
BOOL WINAPI DestroyWindow(_In_ HWND)
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
#define ok(value,...)
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define TBM_SETTICFREQ
Definition: commctrl.h:2022
#define TBM_GETPTICS
Definition: commctrl.h:2016
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
#define expect(expected, got)
Definition: trackbar.c:28
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
unsigned long DWORD
Definition: ntddk_ex.h:95
#define TBM_GETTIC
Definition: commctrl.h:2006
static HWND hWndParent
Definition: trackbar.c:34
#define TBM_GETNUMTICS
Definition: commctrl.h:2018
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
static const struct message empty_seq[]
Definition: trackbar.c:48
#define TBM_GETTICPOS
Definition: commctrl.h:2017
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31

Referenced by START_TEST().

◆ test_tic_settings()

static void test_tic_settings ( void  )
static

Definition at line 968 of file trackbar.c.

969 {
970  HWND hWndTrackbar;
971  int r, i;
972 
973  hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
974  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
975 
976  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, FALSE, 5);
977  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, FALSE, 10);
978 
979  /* testing TBM_SETTIC */
980  /* Set tics at 5 and 10 */
981  /* 0 and 20 are out of range and should not be set */
982  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMAX, 0, 0);
983  expect(10, r);
984  r = SendMessageA(hWndTrackbar, TBM_GETRANGEMIN, 0, 0);
985  expect(5, r);
986 
988  r = SendMessageA(hWndTrackbar, TBM_SETTIC, 0, 0);
989  ok(r == FALSE, "Expected FALSE, got %d\n", r);
990  r = SendMessageA(hWndTrackbar, TBM_SETTIC, 0, 5);
991  ok(r == TRUE, "Expected TRUE, got %d\n", r);
992  r = SendMessageA(hWndTrackbar, TBM_SETTIC, 0, 10);
993  ok(r == TRUE, "Expected TRUE, got %d\n", r);
994 
995  r = SendMessageA(hWndTrackbar, TBM_SETTIC, 0, 20);
996  ok(r == FALSE, "Expected FALSE, got %d\n", r);
997 
998  /* test TBM_SETTICFREQ */
999  SendMessageA(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(0, 10));
1000  SendMessageA(hWndTrackbar, TBM_SETTICFREQ, 2, 0);
1001  r = SendMessageA(hWndTrackbar, TBM_GETNUMTICS, 0, 0);
1002  expect(6, r);
1003  SendMessageA(hWndTrackbar, TBM_SETTICFREQ, 5, 0);
1004  r = SendMessageA(hWndTrackbar, TBM_GETNUMTICS, 0, 0);
1005  expect(3, r);
1006  SendMessageA(hWndTrackbar, TBM_SETTICFREQ, 15, 0);
1007  r = SendMessageA(hWndTrackbar, TBM_GETNUMTICS, 0, 0);
1008  expect(2, r);
1009 
1010  /* test TBM_GETNUMTICS */
1011  /* since TIC FREQ is 15, there should be only 2 tics now */
1012  r = SendMessageA(hWndTrackbar, TBM_GETNUMTICS, 0, 0);
1013  expect(2, r);
1014 
1015  ok_sequence(sequences, TRACKBAR_SEQ_INDEX, tic_settings_test_seq, "tic settings test sequence", TRUE);
1016  ok_sequence(sequences, PARENT_SEQ_INDEX, parent_tic_settings_test_seq, "parent tic settings test sequence", TRUE);
1017 
1018  /* range [0,0], freq = 1 */
1019  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, TRUE, 0);
1020  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, TRUE, 0);
1021  SendMessageA(hWndTrackbar, TBM_SETTICFREQ, 1, 0);
1022  r = SendMessageA(hWndTrackbar, TBM_GETNUMTICS, 0, 0);
1023  expect(2, r);
1024  /* range [0,1], freq = 1 */
1025  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, TRUE, 1);
1026  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, TRUE, 0);
1027  SendMessageA(hWndTrackbar, TBM_SETTICFREQ, 1, 0);
1028  r = SendMessageA(hWndTrackbar, TBM_GETNUMTICS, 0, 0);
1029  expect(2, r);
1030  /* range [0,2], freq = 1 */
1031  SendMessageA(hWndTrackbar, TBM_SETRANGEMAX, TRUE, 2);
1032  SendMessageA(hWndTrackbar, TBM_SETRANGEMIN, TRUE, 0);
1033  SendMessageA(hWndTrackbar, TBM_SETTICFREQ, 1, 0);
1034  r = SendMessageA(hWndTrackbar, TBM_GETNUMTICS, 0, 0);
1035  expect(3, r);
1036 
1037  DestroyWindow(hWndTrackbar);
1038 
1039  /* Test to show that TBM_SETTICFREQ updates thumb */
1040  for (i = 0; i < 2; i++)
1041  {
1043  RECT rect, rect1;
1044  WNDPROC oldproc;
1045 
1046  hWndTrackbar = create_trackbar2(style, hWndParent);
1047  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
1048 
1050  SetWindowLongPtrA(hWndTrackbar, GWLP_USERDATA, (LONG_PTR)oldproc);
1051 
1052  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect);
1053  SendMessageA(hWndTrackbar, TBM_SETPOS, FALSE, 0);
1054  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect1);
1055  ok(EqualRect(&rect, &rect1), "Unexpected thumb rectangle %s, previous %s\n",
1057 
1058  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect);
1059  SendMessageA(hWndTrackbar, TBM_SETRANGE, FALSE, MAKELONG(-100, 100));
1060  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect1);
1061  ok(EqualRect(&rect, &rect1), "Unexpected thumb rectangle %s, previous %s\n",
1063  /* Old position is also 0, but thumb position will be different after range change */
1064  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect);
1065  SendMessageA(hWndTrackbar, TBM_SETPOS, TRUE, 0);
1066  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect1);
1067  ok(EqualRect(&rect, &rect1), "Unexpected thumb rectangle %s, previous %s\n",
1069  /* Previous frequency is also 1, yet thumb is updated */
1070  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect);
1071  SendMessageA(hWndTrackbar, TBM_SETTICFREQ, 1, 0);
1072  SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect1);
1073  ok(!EqualRect(&rect, &rect1), "Unexpected thumb rectangle %s, previous %s\n",
1075 
1076  SetWindowLongPtrA(hWndTrackbar, GWLP_WNDPROC, (LONG_PTR)oldproc);
1077 
1078  DestroyWindow(hWndTrackbar);
1079  }
1080 }
#define TRUE
Definition: types.h:120
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define TBM_SETRANGE
Definition: commctrl.h:2009
#define TBM_GETRANGEMAX
Definition: commctrl.h:2005
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
#define TBM_SETPOS
Definition: commctrl.h:2008
static const DWORD defaultstyle
Definition: trackbar.c:33
BOOL WINAPI DestroyWindow(_In_ HWND)
& rect
Definition: startmenu.cpp:1413
#define TBM_SETRANGEMIN
Definition: commctrl.h:2010
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define TBM_SETRANGEMAX
Definition: commctrl.h:2011
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
static const struct message tic_settings_test_seq[]
Definition: trackbar.c:269
#define ok(value,...)
#define TBM_GETRANGEMIN
Definition: commctrl.h:2004
#define GWLP_USERDATA
Definition: treelist.c:63
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define TBS_AUTOTICKS
Definition: commctrl.h:1987
#define TBM_SETTICFREQ
Definition: commctrl.h:2022
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
#define expect(expected, got)
Definition: trackbar.c:28
const char * wine_dbgstr_rect(const RECT *rect)
static const struct message parent_tic_settings_test_seq[]
Definition: trackbar.c:289
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
unsigned long DWORD
Definition: ntddk_ex.h:95
#define TBM_SETTIC
Definition: commctrl.h:2007
#define SetWindowLongPtrA
Definition: winuser.h:5214
static HWND create_trackbar2(DWORD style, HWND parent)
Definition: trackbar.c:478
#define GWLP_WNDPROC
Definition: treelist.c:66
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2859
static HWND hWndParent
Definition: trackbar.c:34
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
static LRESULT WINAPI trackbar_no_wmpaint_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: trackbar.c:36
#define TBM_GETNUMTICS
Definition: commctrl.h:2018
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define TBM_GETTHUMBRECT
Definition: commctrl.h:2027
Arabic default style
Definition: afstyles.h:93
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31

Referenced by START_TEST().

◆ test_tool_tips()

static void test_tool_tips ( void  )
static

Definition at line 1126 of file trackbar.c.

1127 {
1128  HWND hWndTooltip, hWndTrackbar;
1129  HWND rTest;
1130  int r;
1131 
1132  hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
1133  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
1134 
1136 
1137  /* testing TBM_SETTIPSIDE */
1138  r = SendMessageA(hWndTrackbar, TBM_SETTIPSIDE, TBTS_TOP, 0);
1139  expect(TBTS_TOP, r);
1140  r = SendMessageA(hWndTrackbar, TBM_SETTIPSIDE, TBTS_LEFT, 0);
1141  expect(TBTS_TOP, r);
1142  r = SendMessageA(hWndTrackbar, TBM_SETTIPSIDE, TBTS_BOTTOM, 0);
1143  expect(TBTS_LEFT, r);
1144  r = SendMessageA(hWndTrackbar, TBM_SETTIPSIDE, TBTS_RIGHT, 0);
1145  expect(TBTS_BOTTOM, r);
1146 
1147  /* testing TBM_SETTOOLTIPS */
1150  NULL, NULL, NULL, NULL);
1151 
1152  ok(hWndTooltip != NULL, "Expected non NULL value\n");
1153  if (hWndTooltip != NULL){
1154  SendMessageA(hWndTrackbar, TBM_SETTOOLTIPS, (LPARAM) hWndTooltip, 0);
1155  rTest = (HWND) SendMessageA(hWndTrackbar, TBM_GETTOOLTIPS, 0,0);
1156  ok(rTest == hWndTooltip, "Expected hWndToolTip, got\n");
1157  SendMessageA(hWndTrackbar, TBM_SETTOOLTIPS, 0, 0);
1158  rTest = (HWND) SendMessageA(hWndTrackbar, TBM_GETTOOLTIPS, 0,0);
1159  ok(rTest == NULL, "Expected NULL\n");
1160  SendMessageA(hWndTrackbar, TBM_SETTOOLTIPS, (LPARAM) hWndTooltip, 5);
1161  rTest = (HWND) SendMessageA(hWndTrackbar, TBM_GETTOOLTIPS, 0,0);
1162  ok(rTest == hWndTooltip, "Expected hWndTooltip, got\n");
1163  } else
1164  skip("tool tip control not present?\n");
1165 
1166  /* test TBM_GETTOOLTIPS */
1167  rTest = (HWND) SendMessageA(hWndTrackbar, TBM_GETTOOLTIPS, 0,0);
1168  ok(rTest == hWndTooltip, "Expected hWndTooltip\n");
1169 
1170  ok_sequence(sequences, TRACKBAR_SEQ_INDEX, tool_tips_test_seq, "tool tips test sequence", FALSE);
1171  ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "parent tool tips test sequence", FALSE);
1172 
1173  DestroyWindow(hWndTrackbar);
1174 }
static const struct message tool_tips_test_seq[]
Definition: trackbar.c:340
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define TBM_SETTIPSIDE
Definition: commctrl.h:2033
HANDLE HWND
Definition: compat.h:13
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
static const DWORD defaultstyle
Definition: trackbar.c:33
BOOL WINAPI DestroyWindow(_In_ HWND)
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
#define TBM_SETTOOLTIPS
Definition: commctrl.h:2031
#define ok(value,...)
#define CW_USEDEFAULT
Definition: winuser.h:225
smooth NULL
Definition: ftsmooth.c:416
#define TBM_GETTOOLTIPS
Definition: commctrl.h:2032
LONG_PTR LPARAM
Definition: windef.h:208
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
#define expect(expected, got)
Definition: trackbar.c:28
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
#define TBTS_LEFT
Definition: commctrl.h:2036
#define WS_EX_TOPMOST
Definition: pedump.c:647
#define TBTS_BOTTOM
Definition: commctrl.h:2037
#define TBTS_TOP
Definition: commctrl.h:2035
#define TBTS_RIGHT
Definition: commctrl.h:2038
static HWND hWndParent
Definition: trackbar.c:34
#define TOOLTIPS_CLASSA
Definition: commctrl.h:1680
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
static const struct message empty_seq[]
Definition: trackbar.c:48
#define skip(...)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31

Referenced by START_TEST().

◆ test_trackbar_buddy()

static void test_trackbar_buddy ( void  )
static

Definition at line 489 of file trackbar.c.

490 {
491  HWND hWndLeftBuddy, hWndTrackbar;
492  HWND hWndRightBuddy;
493  HWND hWndCurrentBuddy;
494  HWND rTest;
495 
496  hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
497  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
498 
500 
501  hWndLeftBuddy = CreateWindowA(STATUSCLASSNAMEA, NULL, 0, 0, 0, 300, 20, NULL, NULL, NULL, NULL);
502  ok(hWndLeftBuddy != NULL, "Expected non NULL value\n");
503 
504  if (hWndLeftBuddy != NULL){
505  hWndCurrentBuddy = (HWND) SendMessageA(hWndTrackbar, TBM_GETBUDDY, TRUE, 0);
506  rTest = (HWND) SendMessageA(hWndTrackbar, TBM_SETBUDDY, FALSE, (LPARAM) hWndLeftBuddy);
507  ok(rTest == hWndCurrentBuddy, "Expected hWndCurrentBuddy\n");
508  rTest = (HWND) SendMessageA(hWndTrackbar, TBM_SETBUDDY, FALSE, (LPARAM) hWndLeftBuddy);
509  ok(rTest == hWndLeftBuddy, "Expected hWndLeftBuddy\n");
510  } else
511  skip ("left buddy control not present?\n");
512 
513  hWndRightBuddy = CreateWindowA(STATUSCLASSNAMEA, NULL, 0, 0, 0, 300, 20, NULL, NULL, NULL, NULL);
514 
515  ok(hWndRightBuddy != NULL, "expected non NULL value\n");
516 
517  /* test TBM_SETBUDDY */
518  if (hWndRightBuddy != NULL){
519  hWndCurrentBuddy = (HWND) SendMessageA(hWndTrackbar, TBM_GETBUDDY, TRUE, 0);
520  rTest = (HWND) SendMessageA(hWndTrackbar, TBM_SETBUDDY, TRUE, (LPARAM) hWndRightBuddy);
521  ok(rTest == hWndCurrentBuddy, "Expected hWndCurrentBuddy\n");
522  rTest = (HWND) SendMessageA(hWndTrackbar, TBM_SETBUDDY, TRUE, (LPARAM) hWndRightBuddy);
523  ok(rTest == hWndRightBuddy, "Expected hWndRightbuddy\n");
524  } else
525  skip("Right buddy control not present?\n");
526 
527  /* test TBM_GETBUDDY */
528  if (hWndLeftBuddy != NULL){
529  rTest = (HWND) SendMessageA(hWndTrackbar, TBM_GETBUDDY, FALSE, 0);
530  ok(rTest == hWndLeftBuddy, "Expected hWndLeftBuddy\n");
531  DestroyWindow(hWndLeftBuddy);
532  }
533  if (hWndRightBuddy != NULL){
534  rTest = (HWND) SendMessageA(hWndTrackbar, TBM_GETBUDDY, TRUE,0);
535  ok(rTest == hWndRightBuddy, "Expected hWndRightBuddy\n");
536  DestroyWindow(hWndRightBuddy);
537  }
538 
541 
542  DestroyWindow(hWndTrackbar);
543 }
static const struct message buddy_window_test_seq[]
Definition: trackbar.c:80
#define TRUE
Definition: types.h:120
static const struct message parent_buddy_window_test_seq[]
Definition: trackbar.c:96
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HANDLE HWND
Definition: compat.h:13
#define TBM_GETBUDDY
Definition: commctrl.h:2041
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
static const DWORD defaultstyle
Definition: trackbar.c:33
BOOL WINAPI DestroyWindow(_In_ HWND)
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
#define TBM_SETBUDDY
Definition: commctrl.h:2040
#define ok(value,...)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4184
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
static HWND hWndParent
Definition: trackbar.c:34
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
#define skip(...)
#define STATUSCLASSNAMEA
Definition: commctrl.h:1909
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31

Referenced by START_TEST().

◆ test_unicode()

static void test_unicode ( void  )
static

Definition at line 1177 of file trackbar.c.

1178 {
1179  HWND hWndTrackbar;
1180  int r;
1181 
1182  hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
1183  ok(hWndTrackbar != NULL, "Expected non NULL value\n");
1184 
1186 
1187  /* testing TBM_SETUNICODEFORMAT */
1188  r = SendMessageA(hWndTrackbar, TBM_SETUNICODEFORMAT, TRUE, 0);
1189  ok(r == FALSE, "Expected FALSE, got %d\n",r);
1190  r = SendMessageA(hWndTrackbar, TBM_SETUNICODEFORMAT, FALSE, 0);
1191  ok(r == TRUE, "Expected TRUE, got %d\n",r);
1192 
1193  /* test TBM_GETUNICODEFORMAT */
1194  r = SendMessageA(hWndTrackbar, TBM_GETUNICODEFORMAT, 0,0);
1195  ok(r == FALSE, "Expected FALSE, got %d\n",r);
1196 
1197  ok_sequence(sequences, TRACKBAR_SEQ_INDEX, unicode_test_seq, "unicode test sequence", FALSE);
1198  ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "parent unicode test sequence", FALSE);
1199 
1200  DestroyWindow(hWndTrackbar);
1201 }
#define TRUE
Definition: types.h:120
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define TBM_SETUNICODEFORMAT
Definition: commctrl.h:2042
#define NUM_MSG_SEQUENCE
Definition: trackbar.c:29
#define PARENT_SEQ_INDEX
Definition: trackbar.c:30
static const DWORD defaultstyle
Definition: trackbar.c:33
BOOL WINAPI DestroyWindow(_In_ HWND)
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
#define TBM_GETUNICODEFORMAT
Definition: commctrl.h:2043
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
static HWND create_trackbar(DWORD style, HWND parent)
Definition: trackbar.c:460
static const struct message unicode_test_seq[]
Definition: trackbar.c:355
static HWND hWndParent
Definition: trackbar.c:34
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
static const struct message empty_seq[]
Definition: trackbar.c:48
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31

Referenced by START_TEST().

◆ trackbar_no_wmpaint_proc()

static LRESULT WINAPI trackbar_no_wmpaint_proc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 36 of file trackbar.c.

37 {
39 
40  if (message == WM_PAINT)
41  return 0;
42 
43  return CallWindowProcA(oldproc, hwnd, message, wParam, lParam);
44 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
Definition: tftpd.h:59
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GWLP_USERDATA
Definition: treelist.c:63
#define GetWindowLongPtrA
Definition: winuser.h:4697
#define WM_PAINT
Definition: winuser.h:1602
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2859
LPARAM lParam
Definition: combotst.c:139

Referenced by test_position(), and test_tic_settings().

◆ trackbar_subclass_proc()

static LRESULT WINAPI trackbar_subclass_proc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 440 of file trackbar.c.

440  {
442  static LONG defwndproc_counter = 0;
443  struct message msg = { 0 };
444  LRESULT ret;
445 
446  msg.message = message;
447  msg.flags = sent|wparam|lparam;
448  if (defwndproc_counter) msg.flags |= defwinproc;
449  msg.wParam = wParam;
450  msg.lParam = lParam;
452 
453  defwndproc_counter++;
454  ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam);
455  defwndproc_counter--;
456 
457  return ret;
458 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
Definition: tftpd.h:59
Definition: msg.h:39
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:5579
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static struct msg_sequence * sequences[NUM_MSG_SEQUENCE]
Definition: trackbar.c:46
long LONG
Definition: pedump.c:60
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define GWLP_USERDATA
Definition: treelist.c:63
#define GetWindowLongPtrA
Definition: winuser.h:4697
int ret
Definition: msg.h:34
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2859
#define add_message(msg)
Definition: msg.c:2142
#define msg(x)
Definition: auth_time.c:54
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139
#define TRACKBAR_SEQ_INDEX
Definition: trackbar.c:31
static UINT WPARAM wparam
Definition: combo.c:716

Referenced by create_trackbar().

Variable Documentation

◆ buddy_window_test_seq

const struct message buddy_window_test_seq[]
static
Initial value:
= {
{0}
}
#define TRUE
Definition: types.h:120
Definition: msg.h:39
#define TBM_GETBUDDY
Definition: commctrl.h:2041
#define TBM_SETBUDDY
Definition: commctrl.h:2040
#define WM_PAINT
Definition: winuser.h:1602
Definition: msg.h:34
static UINT WPARAM wparam
Definition: combo.c:716

Definition at line 80 of file trackbar.c.

Referenced by test_trackbar_buddy().

◆ defaultstyle

◆ empty_seq

const struct message empty_seq[]
static

◆ hWndParent

◆ ignore_selection_test_seq

const struct message ignore_selection_test_seq[]
static
Initial value:
= {
{0}
}
#define TRUE
Definition: types.h:120
#define TBM_GETSELSTART
Definition: commctrl.h:2019
#define TBM_GETSELEND
Definition: commctrl.h:2020
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define TBM_SETSEL
Definition: commctrl.h:2013
#define TBM_SETSELEND
Definition: commctrl.h:2015
Definition: msg.h:34
#define TBM_SETSELSTART
Definition: commctrl.h:2014
static UINT WPARAM wparam
Definition: combo.c:716

Definition at line 362 of file trackbar.c.

Referenced by test_ignore_selection().

◆ line_size_test_seq

const struct message line_size_test_seq[]
static
Initial value:
= {
{0}
}
#define TBM_GETLINESIZE
Definition: commctrl.h:2026
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
Definition: msg.h:34
#define TBM_SETLINESIZE
Definition: commctrl.h:2025

Definition at line 108 of file trackbar.c.

Referenced by test_line_size().

◆ page_size_test_seq

const struct message page_size_test_seq[]
static
Initial value:
= {
{0}
}
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define TBM_SETPAGESIZE
Definition: commctrl.h:2023
Definition: msg.h:34
#define TBM_GETPAGESIZE
Definition: commctrl.h:2024

Definition at line 115 of file trackbar.c.

Referenced by test_page_size().

◆ parent_buddy_window_test_seq

const struct message parent_buddy_window_test_seq[]
static
Initial value:
= {
{0}
}
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1748
Definition: msg.h:34
#define WM_NOTIFY
Definition: richedit.h:61

Definition at line 96 of file trackbar.c.

Referenced by test_trackbar_buddy().

◆ parent_create_trackbar_wnd_seq

const struct message parent_create_trackbar_wnd_seq[]
static
Initial value:
= {
{ WM_NOTIFYFORMAT, sent},
{ WM_QUERYUISTATE, sent|optional},
{0}
}
#define WM_IME_NOTIFY
Definition: winuser.h:1806
#define PBT_APMRESUMECRITICAL
Definition: pbt.h:10
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1748
#define WM_NCACTIVATE
Definition: winuser.h:1670
#define PBT_APMRESUMESTANDBY
Definition: pbt.h:12
Definition: msg.h:41
#define WM_IME_SETCONTEXT
Definition: winuser.h:1805
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
Definition: msg.h:34
#define WM_NOTIFY
Definition: richedit.h:61

Definition at line 52 of file trackbar.c.

Referenced by test_create().

◆ parent_new_window_test_seq

const struct message parent_new_window_test_seq[]
static
Initial value:
= {
{ WM_NOTIFYFORMAT, sent},
{ WM_QUERYUISTATE, sent|optional},
{0}
}
#define WM_IME_NOTIFY
Definition: winuser.h:1806
#define PBT_APMRESUMECRITICAL
Definition: pbt.h:10
Definition: msg.h:39
#define WM_NCACTIVATE
Definition: winuser.h:1670
Definition: msg.h:41
#define WM_QUERYNEWPALETTE
Definition: winuser.h:1839
#define WM_IME_SETCONTEXT
Definition: winuser.h:1805
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
Definition: msg.h:34
#define WM_SETFOCUS
Definition: winuser.h:1595

Definition at line 67 of file trackbar.c.

Referenced by test_create().

◆ parent_position_test_seq

const struct message parent_position_test_seq[]
static
Initial value:
= {
{0}
}
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1748
Definition: msg.h:34
#define WM_NOTIFY
Definition: richedit.h:61

Definition at line 140 of file trackbar.c.

Referenced by test_position().

◆ parent_range_test_seq

const struct message parent_range_test_seq[]
static
Initial value:

Definition at line 190 of file trackbar.c.

Referenced by test_range().

◆ parent_selection_test_seq

const struct message parent_selection_test_seq[]
static
Initial value:

Definition at line 249 of file trackbar.c.

Referenced by test_selection().

◆ parent_thumb_length_test_seq

const struct message parent_thumb_length_test_seq[]
static
Initial value:
= {
{0}
}
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1748
Definition: msg.h:34
#define WM_NOTIFY
Definition: richedit.h:61

Definition at line 318 of file trackbar.c.

Referenced by test_thumb_length().

◆ parent_tic_settings_test_seq

const struct message parent_tic_settings_test_seq[]
static
Initial value:
= {
{0}
}
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1748
Definition: msg.h:34
#define WM_NOTIFY
Definition: richedit.h:61

Definition at line 289 of file trackbar.c.

Referenced by test_tic_settings().

◆ position_test_seq

const struct message position_test_seq[]
static
Initial value:
= {
{0}
}
#define TRUE
Definition: types.h:120
Definition: msg.h:39
#define TBM_SETPOS
Definition: commctrl.h:2008
#define TBM_GETPOS
Definition: commctrl.h:2003
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define WM_PAINT
Definition: winuser.h:1602
Definition: msg.h:34
static UINT WPARAM wparam
Definition: combo.c:716

Definition at line 122 of file trackbar.c.

Referenced by test_position().

◆ range_test_seq

const struct message range_test_seq[]
static

Definition at line 150 of file trackbar.c.

Referenced by test_range().

◆ selection_test_seq

const struct message selection_test_seq[]
static

Definition at line 210 of file trackbar.c.

Referenced by test_selection().

◆ sequences

◆ thumb_length_test_seq

const struct message thumb_length_test_seq[]
static
Initial value:
= {
{0}
}
#define TBM_GETTHUMBLENGTH
Definition: commctrl.h:2030
Definition: msg.h:39
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define WM_SIZE
Definition: winuser.h:1593
#define WM_PAINT
Definition: winuser.h:1602
Definition: msg.h:34
#define TBM_SETTHUMBLENGTH
Definition: commctrl.h:2029
static UINT WPARAM wparam
Definition: combo.c:716

Definition at line 301 of file trackbar.c.

Referenced by test_thumb_length().

◆ tic_placement_test_seq

const struct message tic_placement_test_seq[]
static
Initial value:
= {
{0}
}
#define TBM_GETPTICS
Definition: commctrl.h:2016
Definition: msg.h:34
#define TBM_GETTIC
Definition: commctrl.h:2006
#define TBM_GETTICPOS
Definition: commctrl.h:2017
static UINT WPARAM wparam
Definition: combo.c:716

Definition at line 330 of file trackbar.c.

Referenced by test_tic_placement().

◆ tic_settings_test_seq

const struct message tic_settings_test_seq[]
static
Initial value:
= {
{ TBM_SETTIC, sent|lparam, 0, 0},
{ TBM_SETTIC, sent|lparam, 0, 5},
{ TBM_SETTIC, sent|lparam, 0, 10},
{ TBM_SETTIC, sent|lparam, 0, 20},
{0}
}
#define TRUE
Definition: types.h:120
Definition: msg.h:39
#define TBM_SETRANGE
Definition: commctrl.h:2009
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define TBM_SETTICFREQ
Definition: commctrl.h:2022
#define WM_PAINT
Definition: winuser.h:1602
Definition: msg.h:34
#define TBM_SETTIC
Definition: commctrl.h:2007
#define TBM_GETNUMTICS
Definition: commctrl.h:2018
static UINT WPARAM wparam
Definition: combo.c:716

Definition at line 269 of file trackbar.c.

Referenced by test_tic_settings().

◆ tool_tips_test_seq

const struct message tool_tips_test_seq[]
static
Initial value:
= {
{0}
}
#define TBM_SETTIPSIDE
Definition: commctrl.h:2033
#define TBM_SETTOOLTIPS
Definition: commctrl.h:2031
#define TBM_GETTOOLTIPS
Definition: commctrl.h:2032
#define TBTS_LEFT
Definition: commctrl.h:2036
Definition: msg.h:34
#define TBTS_BOTTOM
Definition: commctrl.h:2037
#define TBTS_TOP
Definition: commctrl.h:2035
#define TBTS_RIGHT
Definition: commctrl.h:2038
static UINT WPARAM wparam
Definition: combo.c:716

Definition at line 340 of file trackbar.c.

Referenced by test_tool_tips().

◆ unicode_test_seq

const struct message unicode_test_seq[]
static
Initial value:
= {
{0}
}
#define TRUE
Definition: types.h:120
#define TBM_SETUNICODEFORMAT
Definition: commctrl.h:2042
#define TBM_GETUNICODEFORMAT
Definition: commctrl.h:2043
Definition: msg.h:34
static UINT WPARAM wparam
Definition: combo.c:716

Definition at line 355 of file trackbar.c.

Referenced by test_unicode().