ReactOS  0.4.14-dev-831-gef8c9239
updown.c File Reference
#include <windows.h>
#include <commctrl.h>
#include <stdio.h>
#include "wine/test.h"
#include "msg.h"
Include dependency graph for updown.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_SEQUENCES   3
 
#define PARENT_SEQ_INDEX   0
 
#define EDIT_SEQ_INDEX   1
 
#define UPDOWN_SEQ_INDEX   2
 
#define UPDOWN_ID   0
 
#define BUDDY_ID   1
 
#define X(f)   p##f = (void*)GetProcAddress(hComCtl32, #f);
 
#define X2(f, ord)   p##f = (void*)GetProcAddress(hComCtl32, (const char *)ord);
 

Functions

static HWND (WINAPI *pCreateUpDownControl)(DWORD
 
static BOOL (WINAPI *pSetWindowSubclass)(HWND
 
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 edit_subclass_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static HWND create_edit_control (void)
 
static LRESULT WINAPI updown_subclass_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static HWND create_updown_control (DWORD style, HWND buddy)
 
static void test_updown_pos (void)
 
static void test_updown_pos32 (void)
 
static void test_updown_buddy (void)
 
static void test_updown_base (void)
 
static void test_updown_unicode (void)
 
static void test_updown_create (void)
 
static void test_UDS_SETBUDDYINT (void)
 
static void test_CreateUpDownControl (void)
 
static void test_updown_pos_notifications (void)
 
static void init_functions (void)
 
 START_TEST (updown)
 

Variables

static HWND parent_wnd
 
static HWND g_edit
 
static INT
 
static HWND
 
static HINSTANCE
 
static SUBCLASSPROC
 
static UINT_PTR
 
static DWORD_PTR
 
static struct msg_sequencesequences [NUM_MSG_SEQUENCES]
 
static const struct message add_updown_with_edit_seq []
 
static const struct message add_updown_to_parent_seq []
 
static const struct message get_edit_text_seq []
 
static const struct message test_updown_pos_seq []
 
static const struct message test_updown_pos32_seq []
 
static const struct message test_updown_buddy_seq []
 
static const struct message test_updown_base_seq []
 
static const struct message test_updown_unicode_seq []
 
static const struct message test_updown_pos_nochange_seq []
 
static const struct message test_updown_pos_notifications_seq []
 
static const struct message test_updown_pos_notifications_horz_seq []
 

Macro Definition Documentation

◆ BUDDY_ID

#define BUDDY_ID   1

Definition at line 61 of file updown.c.

◆ EDIT_SEQ_INDEX

#define EDIT_SEQ_INDEX   1

Definition at line 57 of file updown.c.

◆ expect

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

Definition at line 53 of file updown.c.

◆ NUM_MSG_SEQUENCES

#define NUM_MSG_SEQUENCES   3

Definition at line 55 of file updown.c.

◆ PARENT_SEQ_INDEX

#define PARENT_SEQ_INDEX   0

Definition at line 56 of file updown.c.

◆ UPDOWN_ID

#define UPDOWN_ID   0

Definition at line 60 of file updown.c.

◆ UPDOWN_SEQ_INDEX

#define UPDOWN_SEQ_INDEX   2

Definition at line 58 of file updown.c.

◆ X

#define X (   f)    p##f = (void*)GetProcAddress(hComCtl32, #f);

◆ X2

#define X2 (   f,
  ord 
)    p##f = (void*)GetProcAddress(hComCtl32, (const char *)ord);

Function Documentation

◆ BOOL()

static BOOL ( WINAPI pSetWindowSubclass)
static

Referenced by UpDownWindowProc().

◆ create_edit_control()

static HWND create_edit_control ( void  )
static

Definition at line 277 of file updown.c.

278 {
279  WNDPROC oldproc;
280  HWND hwnd;
281  RECT rect;
282 
285  0, 0, rect.right, rect.bottom,
287  if (!hwnd) return NULL;
288 
292 
293  return hwnd;
294 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define WS_CHILD
Definition: pedump.c:617
& rect
Definition: startmenu.cpp:1413
#define WC_EDITA
Definition: commctrl.h:4682
#define GWLP_USERDATA
Definition: treelist.c:63
smooth NULL
Definition: ftsmooth.c:416
#define SetWindowLongPtrA
Definition: winuser.h:5320
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:821
#define GWLP_WNDPROC
Definition: treelist.c:66
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2881
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define WS_BORDER
Definition: pedump.c:625
static LRESULT WINAPI edit_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: updown.c:256
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
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 WS_VISIBLE
Definition: pedump.c:620
static HWND parent_wnd
Definition: updown.c:63

Referenced by START_TEST(), and test_updown_buddy().

◆ create_parent_window()

static HWND create_parent_window ( void  )
static

Definition at line 243 of file updown.c.

244 {
246  return NULL;
247 
248  return CreateWindowExA(0, "Up-Down test parent class",
249  "Up-Down test parent window",
252  0, 0, 100, 100,
254 }
static BOOL register_parent_wnd_class(void)
Definition: updown.c:226
smooth NULL
Definition: ftsmooth.c:416
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:652
#define WS_MAXIMIZEBOX
Definition: pedump.c:632
#define WS_CAPTION
Definition: pedump.c:624
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:821
#define WS_MINIMIZEBOX
Definition: pedump.c:631
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 WS_VISIBLE
Definition: pedump.c:620
#define WS_SYSMENU
Definition: pedump.c:629

Referenced by START_TEST().

◆ create_updown_control()

static HWND create_updown_control ( DWORD  style,
HWND  buddy 
)
static

Definition at line 318 of file updown.c.

319 {
320  WNDPROC oldproc;
321  HWND updown;
322  RECT rect;
323 
326  0, 0, rect.right, rect.bottom,
328  ok(updown != NULL, "Failed to create UpDown control.\n");
329  if (!updown) return NULL;
330 
331  SendMessageA(updown, UDM_SETBUDDY, (WPARAM)buddy, 0);
332  SendMessageA(updown, UDM_SETRANGE, 0, MAKELONG(100, 0));
333  SendMessageA(updown, UDM_SETPOS, 0, MAKELONG(50, 0));
334 
335  oldproc = (WNDPROC)SetWindowLongPtrA(updown, GWLP_WNDPROC,
337  SetWindowLongPtrA(updown, GWLP_USERDATA, (LONG_PTR)oldproc);
338 
339  return updown;
340 }
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static LRESULT WINAPI updown_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: updown.c:296
UINT_PTR WPARAM
Definition: windef.h:207
#define WS_CHILD
Definition: pedump.c:617
& rect
Definition: startmenu.cpp:1413
#define GWLP_USERDATA
Definition: treelist.c:63
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define UDM_SETRANGE
Definition: commctrl.h:2137
#define SetWindowLongPtrA
Definition: winuser.h:5320
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:821
#define UPDOWN_CLASSA
Definition: commctrl.h:2114
#define GWLP_WNDPROC
Definition: treelist.c:66
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2881
#define UDM_SETBUDDY
Definition: commctrl.h:2141
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define WS_BORDER
Definition: pedump.c:625
#define ok(value,...)
Definition: atltest.h:57
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define UDM_SETPOS
Definition: commctrl.h:2139
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)
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
static HWND parent_wnd
Definition: updown.c:63

Referenced by test_UDS_SETBUDDYINT(), test_updown_base(), test_updown_buddy(), test_updown_create(), test_updown_pos(), test_updown_pos32(), test_updown_pos_notifications(), and test_updown_unicode().

◆ edit_subclass_proc()

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

Definition at line 256 of file updown.c.

257 {
259  static LONG defwndproc_counter = 0;
260  struct message msg = { 0 };
261  LRESULT ret;
262 
263  msg.message = message;
264  msg.flags = sent|wparam|lparam;
265  if (defwndproc_counter) msg.flags |= defwinproc;
266  msg.wParam = wParam;
267  msg.lParam = lParam;
268  msg.id = BUDDY_ID;
270 
271  defwndproc_counter++;
272  ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam);
273  defwndproc_counter--;
274  return ret;
275 }
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
#define BUDDY_ID
Definition: updown.c:61
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
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:4803
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: updown.c:69
int ret
Definition: msg.h:34
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2881
#define EDIT_SEQ_INDEX
Definition: updown.c:57
#define add_message(msg)
Definition: msg.c:2113
#define msg(x)
Definition: auth_time.c:54
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139
static UINT WPARAM wparam
Definition: combo.c:716

Referenced by create_edit_control().

◆ HWND()

static HWND ( WINAPI pCreateUpDownControl)
static

◆ init_functions()

static void init_functions ( void  )
static

Definition at line 976 of file updown.c.

977 {
978  HMODULE hComCtl32 = LoadLibraryA("comctl32.dll");
979 
980 #define X(f) p##f = (void*)GetProcAddress(hComCtl32, #f);
981 #define X2(f, ord) p##f = (void*)GetProcAddress(hComCtl32, (const char *)ord);
983  X2(SetWindowSubclass, 410);
984 #undef X
985 #undef X2
986 }
#define X(f)
#define X2(f, ord)
HWND WINAPI CreateUpDownControl(DWORD style, INT x, INT y, INT cx, INT cy, HWND parent, INT id, HINSTANCE inst, HWND buddy, INT maxVal, INT minVal, INT curVal)
Definition: commctrl.c:829
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
BOOL WINAPI SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIDSubclass, DWORD_PTR dwRef)
Definition: commctrl.c:1261

Referenced by START_TEST().

◆ parent_wnd_proc()

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

Definition at line 193 of file updown.c.

194 {
195  static LONG defwndproc_counter = 0;
196  struct message msg = { 0 };
197  LRESULT ret;
198 
199  /* log system messages, except for painting */
200  if (message < WM_USER &&
201  message != WM_PAINT &&
202  message != WM_ERASEBKGND &&
203  message != WM_NCPAINT &&
204  message != WM_NCHITTEST &&
205  message != WM_GETTEXT &&
206  message != WM_GETICON &&
208  {
209  msg.message = message;
210  msg.flags = sent|wparam|lparam;
211  if (defwndproc_counter) msg.flags |= defwinproc;
212  msg.wParam = wParam;
213  msg.lParam = lParam;
214  if (message == WM_NOTIFY && lParam)
215  msg.id = ((NMHDR*)lParam)->code;
217  }
218 
219  defwndproc_counter++;
221  defwndproc_counter--;
222 
223  return ret;
224 }
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 WM_NCHITTEST
Definition: winuser.h:1668
WPARAM wParam
Definition: combotst.c:138
#define WM_NCPAINT
Definition: winuser.h:1669
long LONG
Definition: pedump.c:60
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define WM_PAINT
Definition: winuser.h:1602
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: updown.c:69
#define PARENT_SEQ_INDEX
Definition: updown.c:56
int ret
Definition: msg.h:34
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_USER
Definition: winuser.h:1877
#define add_message(msg)
Definition: msg.c:2113
#define WM_DEVICECHANGE
Definition: winuser.h:1793
#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
#define WM_NOTIFY
Definition: richedit.h:61
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 226 of file updown.c.

227 {
228  WNDCLASSA cls;
229 
230  cls.style = 0;
232  cls.cbClsExtra = 0;
233  cls.cbWndExtra = 0;
235  cls.hIcon = 0;
236  cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
238  cls.lpszMenuName = NULL;
239  cls.lpszClassName = "Up-Down test parent class";
240  return RegisterClassA(&cls);
241 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: updown.c:193
int cbClsExtra
Definition: winuser.h:3140
LPCSTR lpszMenuName
Definition: winuser.h:3146
#define WHITE_BRUSH
Definition: wingdi.h:901
HBRUSH hbrBackground
Definition: winuser.h:3145
int cbWndExtra
Definition: winuser.h:3141
HCURSOR hCursor
Definition: winuser.h:3144
smooth NULL
Definition: ftsmooth.c:416
const char * LPCSTR
Definition: xmlstorage.h:183
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:821
LPCSTR lpszClassName
Definition: winuser.h:3147
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2059
UINT style
Definition: winuser.h:3138
HINSTANCE hInstance
Definition: winuser.h:3142
WNDPROC lpfnWndProc
Definition: winuser.h:3139
#define IDC_ARROW
Definition: winuser.h:682
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
HICON hIcon
Definition: winuser.h:3143

Referenced by create_parent_window().

◆ START_TEST()

START_TEST ( updown  )

Definition at line 988 of file updown.c.

989 {
990  init_functions();
991 
993 
995  ok(parent_wnd != NULL, "Failed to create parent window!\n");
997  ok(g_edit != NULL, "Failed to create edit control\n");
998 
1000  test_updown_pos();
1003  test_updown_base();
1008 
1011 }
#define NUM_MSG_SEQUENCES
Definition: updown.c:55
static void test_CreateUpDownControl(void)
Definition: updown.c:907
static void test_updown_unicode(void)
Definition: updown.c:741
static void test_updown_pos(void)
Definition: updown.c:342
static void test_updown_pos_notifications(void)
Definition: updown.c:930
BOOL WINAPI DestroyWindow(_In_ HWND)
static void test_updown_base(void)
Definition: updown.c:679
static void init_msg_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:391
static HWND create_parent_window(void)
Definition: updown.c:243
smooth NULL
Definition: ftsmooth.c:416
static void init_functions(void)
Definition: updown.c:976
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: updown.c:69
static void test_updown_buddy(void)
Definition: updown.c:551
static void test_updown_pos32(void)
Definition: updown.c:463
#define ok(value,...)
Definition: atltest.h:57
static HWND create_edit_control(void)
Definition: updown.c:277
static void test_UDS_SETBUDDYINT(void)
Definition: updown.c:849
static void test_updown_create(void)
Definition: updown.c:778
static HWND parent_wnd
Definition: updown.c:63
static HWND g_edit
Definition: updown.c:63

◆ test_CreateUpDownControl()

static void test_CreateUpDownControl ( void  )
static

Definition at line 907 of file updown.c.

908 {
909  HWND updown, buddy;
910  DWORD range, pos;
911  RECT rect;
912 
914  updown = pCreateUpDownControl(WS_CHILD | WS_BORDER | WS_VISIBLE,
915  0, 0, rect.right, rect.bottom, parent_wnd, 1, GetModuleHandleA(NULL), g_edit, 100, 10, 50);
916  ok(updown != NULL, "Failed to create control.\n");
917 
918  buddy = (HWND)SendMessageA(updown, UDM_GETBUDDY, 0, 0);
919  ok(buddy == g_edit, "Unexpected buddy window.\n");
920 
921  range = SendMessageA(updown, UDM_GETRANGE, 0, 0);
922  ok(range == MAKELONG(100, 10), "Unexpected range.\n");
923 
924  pos = SendMessageA(updown, UDM_GETPOS, 0, 0);
925  ok(pos == MAKELONG(50, 1), "Unexpected position.\n");
926 
927  DestroyWindow(updown);
928 }
static HWND
Definition: updown.c:65
#define UDM_GETPOS
Definition: commctrl.h:2140
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WS_CHILD
Definition: pedump.c:617
BOOL WINAPI DestroyWindow(_In_ HWND)
& rect
Definition: startmenu.cpp:1413
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
unsigned long DWORD
Definition: ntddk_ex.h:95
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:821
GLenum GLint * range
Definition: glext.h:7539
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define WS_BORDER
Definition: pedump.c:625
#define ok(value,...)
Definition: atltest.h:57
#define UDM_GETRANGE
Definition: commctrl.h:2138
#define UDM_GETBUDDY
Definition: commctrl.h:2142
#define WS_VISIBLE
Definition: pedump.c:620
static HWND parent_wnd
Definition: updown.c:63
static HWND g_edit
Definition: updown.c:63

Referenced by START_TEST().

◆ test_UDS_SETBUDDYINT()

static void test_UDS_SETBUDDYINT ( void  )
static

Definition at line 849 of file updown.c.

850 {
851  HWND updown;
852  DWORD style, ret;
853  CHAR text[10];
854 
855  /* cleanup buddy */
856  text[0] = '\0';
858 
859  /* creating without UDS_SETBUDDYINT */
861  /* try to set UDS_SETBUDDYINT after creation */
862  style = GetWindowLongA(updown, GWL_STYLE);
864  style = GetWindowLongA(updown, GWL_STYLE);
865  ok(style & UDS_SETBUDDYINT, "Expected UDS_SETBUDDY to be set\n");
866  SendMessageA(updown, UDM_SETPOS, 0, 20);
868  ok(lstrlenA(text) == 0, "Expected empty string\n");
869  DestroyWindow(updown);
870 
871  /* creating with UDS_SETBUDDYINT */
874  /* 50 is initial value here */
875  ok(lstrcmpA(text, "50") == 0, "Expected '50', got '%s'\n", text);
876  /* now remove style flag */
877  style = GetWindowLongA(updown, GWL_STYLE);
879  SendMessageA(updown, UDM_SETPOS, 0, 20);
881  ok(lstrcmpA(text, "20") == 0, "Expected '20', got '%s'\n", text);
882  /* set edit text directly, check position */
883  strcpy(text, "10");
885  ret = SendMessageA(updown, UDM_GETPOS, 0, 0);
886  expect(10, ret);
887  strcpy(text, "11");
889  ret = SendMessageA(updown, UDM_GETPOS, 0, 0);
890  expect(11, LOWORD(ret));
891  expect(0, HIWORD(ret));
892  /* set to invalid value */
893  strcpy(text, "21st");
895  ret = SendMessageA(updown, UDM_GETPOS, 0, 0);
896  expect(11, LOWORD(ret));
897  expect(TRUE, HIWORD(ret));
898  /* set style back */
899  style = GetWindowLongA(updown, GWL_STYLE);
901  SendMessageA(updown, UDM_SETPOS, 0, 30);
903  ok(lstrcmpA(text, "30") == 0, "Expected '30', got '%s'\n", text);
904  DestroyWindow(updown);
905 }
#define TRUE
Definition: types.h:120
#define UDM_GETPOS
Definition: commctrl.h:2140
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
Definition: window.c:1326
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
const WCHAR * text
Definition: package.c:1827
char CHAR
Definition: xmlstorage.h:175
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
BOOL WINAPI DestroyWindow(_In_ HWND)
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
static HWND create_updown_control(DWORD style, HWND buddy)
Definition: updown.c:318
#define expect(EXPECTED, GOT)
Definition: updown.c:53
BOOL WINAPI SetWindowTextA(_In_ HWND, _In_opt_ LPCSTR)
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define GWL_STYLE
Definition: winuser.h:846
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define ARRAY_SIZE(a)
Definition: main.h:24
#define UDS_ALIGNRIGHT
Definition: commctrl.h:2129
#define ok(value,...)
Definition: atltest.h:57
#define UDM_SETPOS
Definition: commctrl.h:2139
LONG WINAPI SetWindowLongA(_In_ HWND, _In_ int, _In_ LONG)
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define UDS_SETBUDDYINT
Definition: commctrl.h:2128
#define HIWORD(l)
Definition: typedefs.h:246
Arabic default style
Definition: afstyles.h:93
#define LOWORD(l)
Definition: pedump.c:82
static HWND g_edit
Definition: updown.c:63

Referenced by START_TEST().

◆ test_updown_base()

static void test_updown_base ( void  )
static

Definition at line 679 of file updown.c.

680 {
681  HWND updown;
682  int r;
683  CHAR text[10];
684 
686 
688 
689  SendMessageA(updown, UDM_SETBASE, 10 , 0);
690  r = SendMessageA(updown, UDM_GETBASE, 0 , 0);
691  expect(10,r);
692 
693  /* Set base to an invalid value, should return 0 and stay at 10 */
694  r = SendMessageA(updown, UDM_SETBASE, 80 , 0);
695  expect(0,r);
696  r = SendMessageA(updown, UDM_GETBASE, 0 , 0);
697  expect(10,r);
698 
699  /* Set base to 16 now, should get 16 as the return */
700  r = SendMessageA(updown, UDM_SETBASE, 16 , 0);
701  expect(10,r);
702  r = SendMessageA(updown, UDM_GETBASE, 0 , 0);
703  expect(16,r);
704 
705  /* Set base to an invalid value, should return 0 and stay at 16 */
706  r = SendMessageA(updown, UDM_SETBASE, 80 , 0);
707  expect(0,r);
708  r = SendMessageA(updown, UDM_GETBASE, 0 , 0);
709  expect(16,r);
710 
711  /* Set base back to 10, return should be 16 */
712  r = SendMessageA(updown, UDM_SETBASE, 10 , 0);
713  expect(16,r);
714  r = SendMessageA(updown, UDM_GETBASE, 0 , 0);
715  expect(10,r);
716 
718 
719  DestroyWindow(updown);
720 
721  /* switch base with buddy attached */
723 
724  r = SendMessageA(updown, UDM_SETPOS, 0, 10);
725  expect(50, r);
726 
728  ok(lstrcmpA(text, "10") == 0, "Expected '10', got '%s'\n", text);
729 
730  r = SendMessageA(updown, UDM_SETBASE, 16, 0);
731  expect(10, r);
732 
734  /* FIXME: currently hex output isn't properly formatted, but for this
735  test only change from initial text matters */
736  ok(lstrcmpA(text, "10") != 0, "Expected '0x000A', got '%s'\n", text);
737 
738  DestroyWindow(updown);
739 }
#define NUM_MSG_SEQUENCES
Definition: updown.c:55
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
Definition: window.c:1326
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
const WCHAR * text
Definition: package.c:1827
char CHAR
Definition: xmlstorage.h:175
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
BOOL WINAPI DestroyWindow(_In_ HWND)
#define UDM_GETBASE
Definition: commctrl.h:2146
#define UPDOWN_SEQ_INDEX
Definition: updown.c:58
static HWND create_updown_control(DWORD style, HWND buddy)
Definition: updown.c:318
#define expect(EXPECTED, GOT)
Definition: updown.c:53
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: updown.c:69
#define ARRAY_SIZE(a)
Definition: main.h:24
#define UDS_ALIGNRIGHT
Definition: commctrl.h:2129
#define ok(value,...)
Definition: atltest.h:57
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
#define UDM_SETPOS
Definition: commctrl.h:2139
#define UDS_SETBUDDYINT
Definition: commctrl.h:2128
static const struct message test_updown_base_seq[]
Definition: updown.c:138
#define UDM_SETBASE
Definition: commctrl.h:2145
static HWND g_edit
Definition: updown.c:63

Referenced by START_TEST().

◆ test_updown_buddy()

static void test_updown_buddy ( void  )
static

Definition at line 551 of file updown.c.

552 {
553  HWND updown, buddyReturn, buddy;
554  RECT rect, rect2;
555  WNDPROC proc;
556  DWORD style;
557 
559 
561 
562  buddyReturn = (HWND)SendMessageA(updown, UDM_GETBUDDY, 0 , 0 );
563  ok(buddyReturn == g_edit, "Expected edit handle\n");
564 
565  buddyReturn = (HWND)SendMessageA(updown, UDM_SETBUDDY, (WPARAM) g_edit, 0);
566  ok(buddyReturn == g_edit, "Expected edit handle\n");
567 
568  buddyReturn = (HWND)SendMessageA(updown, UDM_GETBUDDY, 0 , 0 );
569  ok(buddyReturn == g_edit, "Expected edit handle\n");
570 
572  ok_sequence(sequences, EDIT_SEQ_INDEX, add_updown_with_edit_seq, "test updown buddy_edit", FALSE);
573 
574  DestroyWindow(updown);
575 
576  buddy = create_edit_control();
578 
579  updown= create_updown_control(UDS_ALIGNRIGHT, buddy);
580  ok(proc == (WNDPROC)GetWindowLongPtrA(buddy, GWLP_WNDPROC), "No subclassing expected\n");
581 
582  style = GetWindowLongA(updown, GWL_STYLE);
584  style = GetWindowLongA(updown, GWL_STYLE);
585  ok(style & UDS_ARROWKEYS, "Expected UDS_ARROWKEYS\n");
586  /* no subclass if UDS_ARROWKEYS set after creation */
587  ok(proc == (WNDPROC)GetWindowLongPtrA(buddy, GWLP_WNDPROC), "No subclassing expected\n");
588 
589  DestroyWindow(updown);
590 
592  ok(proc != (WNDPROC)GetWindowLongPtrA(buddy, GWLP_WNDPROC), "Subclassing expected\n");
593 
594  if (pSetWindowSubclass)
595  {
596  /* updown uses subclass helpers for buddy on >5.8x systems */
597  ok(GetPropA(buddy, "CC32SubclassInfo") != NULL, "Expected CC32SubclassInfo property\n");
598  }
599 
600  DestroyWindow(updown);
601  DestroyWindow(buddy);
602 
603  /* Create with buddy and UDS_HORZ, reset buddy. */
605 
606  buddyReturn = (HWND)SendMessageA(updown, UDM_GETBUDDY, 0, 0);
607  ok(buddyReturn == g_edit, "Unexpected buddy window.\n");
608 
609  GetClientRect(updown, &rect);
610 
611  buddyReturn = (HWND)SendMessageA(updown, UDM_SETBUDDY, 0, 0);
612  ok(buddyReturn == g_edit, "Unexpected buddy window.\n");
613 
614  GetClientRect(updown, &rect2);
615  ok(EqualRect(&rect, &rect2), "Unexpected window rect.\n");
616 
617  /* Remove UDS_HORZ, reset buddy again. */
618  style = GetWindowLongA(updown, GWL_STYLE);
619  SetWindowLongA(updown, GWL_STYLE, style & ~UDS_HORZ);
620  style = GetWindowLongA(updown, GWL_STYLE);
621  ok(!(style & UDS_HORZ), "Unexpected style.\n");
622 
623  buddyReturn = (HWND)SendMessageA(updown, UDM_SETBUDDY, 0, 0);
624  ok(buddyReturn == NULL, "Unexpected buddy window.\n");
625 
626  GetClientRect(updown, &rect2);
627  ok(EqualRect(&rect, &rect2), "Unexpected window rect.\n");
628 
629  DestroyWindow(updown);
630 
631  /* Without UDS_HORZ. */
632  updown = create_updown_control(0, g_edit);
633 
634  buddyReturn = (HWND)SendMessageA(updown, UDM_GETBUDDY, 0, 0);
635  ok(buddyReturn == g_edit, "Unexpected buddy window.\n");
636 
637  GetClientRect(updown, &rect);
638 
639  buddyReturn = (HWND)SendMessageA(updown, UDM_SETBUDDY, 0, 0);
640  ok(buddyReturn == g_edit, "Unexpected buddy window.\n");
641 
642  GetClientRect(updown, &rect2);
643  ok(EqualRect(&rect, &rect2), "Unexpected window rect.\n");
644 
645  DestroyWindow(updown);
646 
647  /* Create without buddy. */
650  0, 0, rect.right, rect.bottom, parent_wnd, (HMENU)1, GetModuleHandleA(NULL), NULL);
651  ok(updown != NULL, "Failed to create UpDown control.\n");
652 
653  GetClientRect(updown, &rect);
654  buddyReturn = (HWND)SendMessageA(updown, UDM_SETBUDDY, 0, 0);
655  ok(buddyReturn == NULL, "Unexpected buddy window.\n");
656  GetClientRect(updown, &rect2);
657 
658  ok(EqualRect(&rect, &rect2), "Unexpected window rect.\n");
659 
660  style = GetWindowLongA(updown, GWL_STYLE);
661  SetWindowLongA(updown, GWL_STYLE, style & ~UDS_HORZ);
662 
663  GetClientRect(updown, &rect2);
664  ok(EqualRect(&rect, &rect2), "Unexpected window rect.\n");
665 
666  buddyReturn = (HWND)SendMessageA(updown, UDM_SETBUDDY, (WPARAM)g_edit, 0);
667  ok(buddyReturn == NULL, "Unexpected buddy window.\n");
668  GetClientRect(updown, &rect);
669 
670  buddyReturn = (HWND)SendMessageA(updown, UDM_SETBUDDY, 0, 0);
671  ok(buddyReturn == g_edit, "Unexpected buddy window.\n");
672  GetClientRect(updown, &rect2);
673 todo_wine
674  ok(EqualRect(&rect, &rect2), "Unexpected window rect.\n");
675 
676  DestroyWindow(updown);
677 }
RECT rect2
Definition: edittest.c:51
static HWND
Definition: updown.c:65
#define TRUE
Definition: types.h:120
#define NUM_MSG_SEQUENCES
Definition: updown.c:55
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
UINT_PTR WPARAM
Definition: windef.h:207
static HANDLE proc()
Definition: pdb.c:32
#define WS_CHILD
Definition: pedump.c:617
BOOL WINAPI DestroyWindow(_In_ HWND)
& rect
Definition: startmenu.cpp:1413
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
#define UPDOWN_SEQ_INDEX
Definition: updown.c:58
#define UDS_ARROWKEYS
Definition: commctrl.h:2132
static HWND create_updown_control(DWORD style, HWND buddy)
Definition: updown.c:318
smooth NULL
Definition: ftsmooth.c:416
#define GetWindowLongPtrA
Definition: winuser.h:4803
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
unsigned long DWORD
Definition: ntddk_ex.h:95
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: updown.c:69
#define todo_wine
Definition: test.h:162
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:821
#define UDS_HORZ
Definition: commctrl.h:2133
#define UPDOWN_CLASSA
Definition: commctrl.h:2114
static const struct message add_updown_with_edit_seq[]
Definition: updown.c:71
#define GWLP_WNDPROC
Definition: treelist.c:66
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2881
static const struct message test_updown_buddy_seq[]
Definition: updown.c:123
#define GWL_STYLE
Definition: winuser.h:846
#define UDM_SETBUDDY
Definition: commctrl.h:2141
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define EDIT_SEQ_INDEX
Definition: updown.c:57
#define WS_BORDER
Definition: pedump.c:625
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
HANDLE WINAPI GetPropA(_In_ HWND, _In_ LPCSTR)
#define UDS_ALIGNRIGHT
Definition: commctrl.h:2129
#define ok(value,...)
Definition: atltest.h:57
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
static HWND create_edit_control(void)
Definition: updown.c:277
#define UDM_GETBUDDY
Definition: commctrl.h:2142
LONG WINAPI SetWindowLongA(_In_ HWND, _In_ int, _In_ LONG)
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)
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
static HWND parent_wnd
Definition: updown.c:63
static HWND g_edit
Definition: updown.c:63

Referenced by START_TEST().

◆ test_updown_create()

static void test_updown_create ( void  )
static

Definition at line 778 of file updown.c.

779 {
780  CHAR text[MAX_PATH];
781  HWND updown;
782  RECT r;
783 
785 
787  ok(updown != NULL, "Failed to create updown control\n");
788  ok_sequence(sequences, PARENT_SEQ_INDEX, add_updown_to_parent_seq, "add updown control to parent", TRUE);
789  ok_sequence(sequences, EDIT_SEQ_INDEX, add_updown_with_edit_seq, "add updown control with edit", FALSE);
790 
792 
794  ok(lstrlenA(text) == 0, "Expected empty string\n");
796 
797  DestroyWindow(updown);
798 
799  /* create with zero width */
800  updown = CreateWindowA (UPDOWN_CLASSA, 0, WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 0,
802  ok(updown != NULL, "Failed to create updown control\n");
803  r.right = 0;
804  GetClientRect(updown, &r);
805  ok(r.right > 0, "Expected default width, got %d\n", r.right);
806  DestroyWindow(updown);
807  /* create with really small width */
808  updown = CreateWindowA (UPDOWN_CLASSA, 0, WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 2, 0,
810  ok(updown != NULL, "Failed to create updown control\n");
811  r.right = 0;
812  GetClientRect(updown, &r);
813  ok(r.right != 2 && r.right > 0, "Expected default width, got %d\n", r.right);
814  DestroyWindow(updown);
815  /* create with width greater than default */
816  updown = CreateWindowA (UPDOWN_CLASSA, 0, WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 100, 0,
818  ok(updown != NULL, "Failed to create updown control\n");
819  r.right = 0;
820  GetClientRect(updown, &r);
821  ok(r.right < 100 && r.right > 0, "Expected default width, got %d\n", r.right);
822  DestroyWindow(updown);
823  /* create with zero height, UDS_HORZ */
824  updown = CreateWindowA (UPDOWN_CLASSA, 0, UDS_HORZ | WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 0,
826  ok(updown != NULL, "Failed to create updown control\n");
827  r.bottom = 0;
828  GetClientRect(updown, &r);
829  ok(r.bottom == 0, "Expected zero height, got %d\n", r.bottom);
830  DestroyWindow(updown);
831  /* create with really small height, UDS_HORZ */
832  updown = CreateWindowA (UPDOWN_CLASSA, 0, UDS_HORZ | WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 2,
834  ok(updown != NULL, "Failed to create updown control\n");
835  r.bottom = 0;
836  GetClientRect(updown, &r);
837  ok(r.bottom == 0, "Expected zero height, got %d\n", r.bottom);
838  DestroyWindow(updown);
839  /* create with height greater than default, UDS_HORZ */
840  updown = CreateWindowA (UPDOWN_CLASSA, 0, UDS_HORZ | WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 100,
842  ok(updown != NULL, "Failed to create updown control\n");
843  r.bottom = 0;
844  GetClientRect(updown, &r);
845  ok(r.bottom < 100 && r.bottom > 0, "Expected default height, got %d\n", r.bottom);
846  DestroyWindow(updown);
847 }
#define TRUE
Definition: types.h:120
#define NUM_MSG_SEQUENCES
Definition: updown.c:55
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
Definition: window.c:1326
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
const WCHAR * text
Definition: package.c:1827
char CHAR
Definition: xmlstorage.h:175
#define WS_CHILD
Definition: pedump.c:617
BOOL WINAPI DestroyWindow(_In_ HWND)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4290
static HWND create_updown_control(DWORD style, HWND buddy)
Definition: updown.c:318
smooth NULL
Definition: ftsmooth.c:416
#define MAX_PATH
Definition: compat.h:26
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
static const struct message add_updown_to_parent_seq[]
Definition: updown.c:79
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: updown.c:69
#define PARENT_SEQ_INDEX
Definition: updown.c:56
static const struct message get_edit_text_seq[]
Definition: updown.c:86
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:821
#define UDS_HORZ
Definition: commctrl.h:2133
#define UPDOWN_CLASSA
Definition: commctrl.h:2114
uint32_t DWORD_PTR
Definition: typedefs.h:63
static const struct message add_updown_with_edit_seq[]
Definition: updown.c:71
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define EDIT_SEQ_INDEX
Definition: updown.c:57
#define WS_BORDER
Definition: pedump.c:625
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define UDS_ALIGNRIGHT
Definition: commctrl.h:2129
#define ok(value,...)
Definition: atltest.h:57
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
#define WS_VISIBLE
Definition: pedump.c:620
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
static HWND parent_wnd
Definition: updown.c:63
static HWND g_edit
Definition: updown.c:63

Referenced by START_TEST().

◆ test_updown_pos()

static void test_updown_pos ( void  )
static

Definition at line 342 of file updown.c.

343 {
344  HWND updown;
345  int r;
346 
348 
350 
351  /* Set Range from 0 to 100 */
352  SendMessageA(updown, UDM_SETRANGE, 0 , MAKELONG(100,0) );
353  r = SendMessageA(updown, UDM_GETRANGE, 0,0);
354  expect(100,LOWORD(r));
355  expect(0,HIWORD(r));
356 
357  /* Set the position to 5, return is not checked as it was set before func call */
358  SendMessageA(updown, UDM_SETPOS, 0 , MAKELONG(5,0) );
359  /* Since UDM_SETBUDDYINT was not set at creation HIWORD(r) will always be 1 as a return from UDM_GETPOS */
360  /* Get the position, which should be 5 */
361  r = SendMessageA(updown, UDM_GETPOS, 0 , 0 );
362  expect(5,LOWORD(r));
363  expect(1,HIWORD(r));
364 
365  /* Set the position to 0, return should be 5 */
366  r = SendMessageA(updown, UDM_SETPOS, 0 , MAKELONG(0,0) );
367  expect(5,r);
368  /* Get the position, which should be 0 */
369  r = SendMessageA(updown, UDM_GETPOS, 0 , 0 );
370  expect(0,LOWORD(r));
371  expect(1,HIWORD(r));
372 
373  /* Set the position to -1, return should be 0 */
374  r = SendMessageA(updown, UDM_SETPOS, 0 , MAKELONG(-1,0) );
375  expect(0,r);
376  /* Get the position, which should be 0 */
377  r = SendMessageA(updown, UDM_GETPOS, 0 , 0 );
378  expect(0,LOWORD(r));
379  expect(1,HIWORD(r));
380 
381  /* Set the position to 100, return should be 0 */
382  r = SendMessageA(updown, UDM_SETPOS, 0 , MAKELONG(100,0) );
383  expect(0,r);
384  /* Get the position, which should be 100 */
385  r = SendMessageA(updown, UDM_GETPOS, 0 , 0 );
386  expect(100,LOWORD(r));
387  expect(1,HIWORD(r));
388 
389  /* Set the position to 101, return should be 100 */
390  r = SendMessageA(updown, UDM_SETPOS, 0 , MAKELONG(101,0) );
391  expect(100,r);
392  /* Get the position, which should be 100 */
393  r = SendMessageA(updown, UDM_GETPOS, 0 , 0 );
394  expect(100,LOWORD(r));
395  expect(1,HIWORD(r));
396 
398 
399  DestroyWindow(updown);
400 
401  /* there's no attempt to update buddy Edit if text didn't change */
402  SetWindowTextA(g_edit, "50");
404 
405  /* test sequence only on 5.8x versions */
406  r = SendMessageA(updown, UDM_GETPOS32, 0, 0);
407  if (r)
408  {
409  UDACCEL accel;
410 
412 
413  r = SendMessageA(updown, UDM_SETPOS, 0, 50);
414  expect(50,r);
415 
417  "test updown pos, no change", FALSE);
418 
419  SendMessageA(updown, UDM_SETRANGE, 0, MAKELONG(1, 40));
420  r = SendMessageA(updown, UDM_GETRANGE, 0, 0);
421  expect(1, LOWORD(r));
422  expect(40, HIWORD(r));
423 
424  accel.nSec = 0;
425  accel.nInc = 5;
426  r = SendMessageA(updown, UDM_SETACCEL, 1, (LPARAM)&accel);
427  expect(TRUE, r);
428 
429  r = SendMessageA(updown, UDM_GETPOS, 0, 0);
430  expect(40, LOWORD(r));
431  expect(1, HIWORD(r));
432 
433  r = SendMessageA(updown, UDM_SETPOS, 0, MAKELONG(0, 0));
434  expect(40, LOWORD(r));
435  expect(0, HIWORD(r));
436 
437  r = SendMessageA(updown, UDM_GETPOS, 0, 0);
438  expect(1, LOWORD(r));
439  expect(0, HIWORD(r));
440 
441  r = SendMessageA(updown, UDM_SETPOS, 0, MAKELONG(2, 0));
442  expect(1, LOWORD(r));
443  expect(0, HIWORD(r));
444 
446  expect(0, r);
447  r = SendMessageA(updown, UDM_GETPOS, 0, 0);
448  expect(1, LOWORD(r));
449  expect(0, HIWORD(r));
450 
451  r = SendMessageA(updown, UDM_SETPOS, 0, MAKELONG(50, 0));
452  expect(1, LOWORD(r));
453  expect(0, HIWORD(r));
454 
455  r = SendMessageA(updown, UDM_GETPOS, 0, 0);
456  expect(40, LOWORD(r));
457  expect(0, HIWORD(r));
458  }
459 
460  DestroyWindow(updown);
461 }
#define TRUE
Definition: types.h:120
#define NUM_MSG_SEQUENCES
Definition: updown.c:55
#define UDM_GETPOS
Definition: commctrl.h:2140
#define UDM_GETPOS32
Definition: commctrl.h:2152
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define UDM_SETACCEL
Definition: commctrl.h:2143
static const struct message test_updown_pos_nochange_seq[]
Definition: updown.c:162
BOOL WINAPI DestroyWindow(_In_ HWND)
#define VK_UP
Definition: winuser.h:2200
#define UPDOWN_SEQ_INDEX
Definition: updown.c:58
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define UDS_ARROWKEYS
Definition: commctrl.h:2132
static HWND create_updown_control(DWORD style, HWND buddy)
Definition: updown.c:318
#define WM_KEYDOWN
Definition: winuser.h:1697
LONG_PTR LPARAM
Definition: windef.h:208
#define UDM_SETRANGE
Definition: commctrl.h:2137
#define expect(EXPECTED, GOT)
Definition: updown.c:53
BOOL WINAPI SetWindowTextA(_In_ HWND, _In_opt_ LPCSTR)
UINT nSec
Definition: commctrl.h:2120
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: updown.c:69
UINT nInc
Definition: commctrl.h:2121
#define EDIT_SEQ_INDEX
Definition: updown.c:57
#define UDS_ALIGNRIGHT
Definition: commctrl.h:2129
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
#define UDM_SETPOS
Definition: commctrl.h:2139
#define UDM_GETRANGE
Definition: commctrl.h:2138
#define UDS_SETBUDDYINT
Definition: commctrl.h:2128
#define HIWORD(l)
Definition: typedefs.h:246
#define LOWORD(l)
Definition: pedump.c:82
static const struct message test_updown_pos_seq[]
Definition: updown.c:91
static HWND g_edit
Definition: updown.c:63

Referenced by START_TEST().

◆ test_updown_pos32()

static void test_updown_pos32 ( void  )
static

Definition at line 463 of file updown.c.

464 {
465  HWND updown;
466  int r;
467  int low, high;
468 
470 
472 
473  /* Set the position to 0 to 1000 */
474  SendMessageA(updown, UDM_SETRANGE32, 0 , 1000 );
475 
476  low = high = -1;
477  r = SendMessageA(updown, UDM_GETRANGE32, (WPARAM) &low , (LPARAM) &high );
478  expect(0,r);
479  if (low == -1)
480  {
481  win_skip("UDM_SETRANGE32/UDM_GETRANGE32 not available\n");
482  DestroyWindow(updown);
483  return;
484  }
485 
486  expect(0,low);
487  expect(1000,high);
488 
489  /* Set position to 500 */
490  r = SendMessageA(updown, UDM_SETPOS32, 0 , 500 );
491  if (!r)
492  {
493  win_skip("UDM_SETPOS32 and UDM_GETPOS32 need 5.80\n");
494  DestroyWindow(updown);
495  return;
496  }
497  expect(50,r);
498 
499  /* Since UDM_SETBUDDYINT was not set at creation bRet will always be true as a return from UDM_GETPOS32 */
500 
501  r = SendMessageA(updown, UDM_GETPOS32, 0 , (LPARAM) &high );
502  expect(500,r);
503  expect(1,high);
504 
505  /* Set position to 0, return should be 500 */
506  r = SendMessageA(updown, UDM_SETPOS32, 0 , 0 );
507  expect(500,r);
508  r = SendMessageA(updown, UDM_GETPOS32, 0 , (LPARAM) &high );
509  expect(0,r);
510  expect(1,high);
511 
512  /* Set position to -1 which should become 0, return should be 0 */
513  r = SendMessageA(updown, UDM_SETPOS32, 0 , -1 );
514  expect(0,r);
515  r = SendMessageA(updown, UDM_GETPOS32, 0 , (LPARAM) &high );
516  expect(0,r);
517  expect(1,high);
518 
519  /* Set position to 1000, return should be 0 */
520  r = SendMessageA(updown, UDM_SETPOS32, 0 , 1000 );
521  expect(0,r);
522  r = SendMessageA(updown, UDM_GETPOS32, 0 , (LPARAM) &high );
523  expect(1000,r);
524  expect(1,high);
525 
526  /* Set position to 1001 which should become 1000, return should be 1000 */
527  r = SendMessageA(updown, UDM_SETPOS32, 0 , 1001 );
528  expect(1000,r);
529  r = SendMessageA(updown, UDM_GETPOS32, 0 , (LPARAM) &high );
530  expect(1000,r);
531  expect(1,high);
532 
534 
535  DestroyWindow(updown);
536 
537  /* there's no attempt to update buddy Edit if text didn't change */
538  SetWindowTextA(g_edit, "50");
540 
542 
543  r = SendMessageA(updown, UDM_SETPOS32, 0, 50);
544  expect(50,r);
546  "test updown pos, no change", FALSE);
547 
548  DestroyWindow(updown);
549 }
#define NUM_MSG_SEQUENCES
Definition: updown.c:55
#define UDM_GETPOS32
Definition: commctrl.h:2152
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
UINT_PTR WPARAM
Definition: windef.h:207
static const struct message test_updown_pos_nochange_seq[]
Definition: updown.c:162
#define UDM_GETRANGE32
Definition: commctrl.h:2148
BOOL WINAPI DestroyWindow(_In_ HWND)
#define UPDOWN_SEQ_INDEX
Definition: updown.c:58
static HWND create_updown_control(DWORD style, HWND buddy)
Definition: updown.c:318
LONG_PTR LPARAM
Definition: windef.h:208
#define UDM_SETRANGE32
Definition: commctrl.h:2147
#define expect(EXPECTED, GOT)
Definition: updown.c:53
BOOL WINAPI SetWindowTextA(_In_ HWND, _In_opt_ LPCSTR)
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
#define UDM_SETPOS32
Definition: commctrl.h:2151
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: updown.c:69
#define EDIT_SEQ_INDEX
Definition: updown.c:57
#define UDS_ALIGNRIGHT
Definition: commctrl.h:2129
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
#define UDS_SETBUDDYINT
Definition: commctrl.h:2128
static const struct message test_updown_pos32_seq[]
Definition: updown.c:107
#define win_skip
Definition: test.h:149
static HWND g_edit
Definition: updown.c:63

Referenced by START_TEST().

◆ test_updown_pos_notifications()

static void test_updown_pos_notifications ( void  )
static

Definition at line 930 of file updown.c.

931 {
932  HWND updown;
933  RECT rect;
934  UINT x, y;
935  int result;
936 
937  /* test updown control notifications without UDS_HORZ style */
939  SetFocus(updown);
941 
942  /* click on the up-arrow button */
943  GetClientRect(updown, &rect);
944  x = rect.left + (rect.right - rect.left) / 2;
945  y = rect.top + (rect.bottom - rect.top) / 4;
946  result = SendMessageA(updown, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y));
947  expect(result, 0);
948  result = SendMessageA(updown, WM_LBUTTONUP, 0, MAKELPARAM(x, y));
949  expect(result, 0);
950 
952  "test updown to parent notify (vertical)", FALSE);
953 
954  DestroyWindow(updown);
955 
956  /* test updown control notifications with UDS_HORZ style */
958  SetFocus(updown);
960 
961  /* click on the right-arrow button */
962  GetClientRect(updown, &rect);
963  x = rect.left + (rect.right - rect.left) * 3 / 4;
964  y = rect.top + (rect.bottom - rect.top) / 2;
965  result = SendMessageA(updown, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y));
966  expect(result, 0);
967  result = SendMessageA(updown, WM_LBUTTONUP, 0, MAKELPARAM(x, y));
968  expect(result, 0);
969 
971  "test updown to parent notify (horizontal)", FALSE);
972 
973  DestroyWindow(updown);
974 }
static const struct message test_updown_pos_notifications_horz_seq[]
Definition: updown.c:180
#define NUM_MSG_SEQUENCES
Definition: updown.c:55
#define WM_LBUTTONDOWN
Definition: winuser.h:1758
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define MAKELPARAM(l, h)
Definition: winuser.h:3983
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
& rect
Definition: startmenu.cpp:1413
static HWND create_updown_control(DWORD style, HWND buddy)
Definition: updown.c:318
#define expect(EXPECTED, GOT)
Definition: updown.c:53
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: updown.c:69
#define PARENT_SEQ_INDEX
Definition: updown.c:56
#define UDS_HORZ
Definition: commctrl.h:2133
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define UDS_ALIGNRIGHT
Definition: commctrl.h:2129
#define WM_LBUTTONUP
Definition: winuser.h:1759
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
unsigned int UINT
Definition: ndis.h:50
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define UDS_SETBUDDYINT
Definition: commctrl.h:2128
GLuint64EXT * result
Definition: glext.h:11304
static HWND g_edit
Definition: updown.c:63
static const struct message test_updown_pos_notifications_seq[]
Definition: updown.c:167

Referenced by START_TEST().

◆ test_updown_unicode()

static void test_updown_unicode ( void  )
static

Definition at line 741 of file updown.c.

742 {
743  HWND updown;
744  int r;
745 
747 
749 
750  /* Set it to ANSI, don't check return as we don't know previous state */
751  SendMessageA(updown, UDM_SETUNICODEFORMAT, 0 , 0);
752  r = SendMessageA(updown, UDM_GETUNICODEFORMAT, 0 , 0);
753  expect(0,r);
754 
755  /* Now set it to Unicode format */
756  r = SendMessageA(updown, UDM_SETUNICODEFORMAT, 1 , 0);
757  expect(0,r);
758  r = SendMessageA(updown, UDM_GETUNICODEFORMAT, 0 , 0);
759  if (!r)
760  {
761  win_skip("UDM_SETUNICODEFORMAT not available\n");
762  DestroyWindow(updown);
763  return;
764  }
765  expect(1,r);
766 
767  /* And now set it back to ANSI */
768  r = SendMessageA(updown, UDM_SETUNICODEFORMAT, 0 , 0);
769  expect(1,r);
770  r = SendMessageA(updown, UDM_GETUNICODEFORMAT, 0 , 0);
771  expect(0,r);
772 
774 
775  DestroyWindow(updown);
776 }
#define NUM_MSG_SEQUENCES
Definition: updown.c:55
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
BOOL WINAPI DestroyWindow(_In_ HWND)
#define UPDOWN_SEQ_INDEX
Definition: updown.c:58
static HWND create_updown_control(DWORD style, HWND buddy)
Definition: updown.c:318
#define expect(EXPECTED, GOT)
Definition: updown.c:53
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: updown.c:69
#define UDS_ALIGNRIGHT
Definition: commctrl.h:2129
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
#define win_skip
Definition: test.h:149
#define UDM_GETUNICODEFORMAT
Definition: commctrl.h:2150
static const struct message test_updown_unicode_seq[]
Definition: updown.c:152
static HWND g_edit
Definition: updown.c:63
#define UDM_SETUNICODEFORMAT
Definition: commctrl.h:2149

Referenced by START_TEST().

◆ updown_subclass_proc()

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

Definition at line 296 of file updown.c.

297 {
299  static LONG defwndproc_counter = 0;
300  struct message msg = { 0 };
301  LRESULT ret;
302 
303  msg.message = message;
304  msg.flags = sent|wparam|lparam;
305  if (defwndproc_counter) msg.flags |= defwinproc;
306  msg.wParam = wParam;
307  msg.lParam = lParam;
308  msg.id = UPDOWN_ID;
310 
311  defwndproc_counter++;
312  ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam);
313  defwndproc_counter--;
314 
315  return ret;
316 }
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)
#define UPDOWN_SEQ_INDEX
Definition: updown.c:58
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:4803
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: updown.c:69
int ret
Definition: msg.h:34
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2881
#define add_message(msg)
Definition: msg.c:2113
#define msg(x)
Definition: auth_time.c:54
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139
#define UPDOWN_ID
Definition: updown.c:60
static UINT WPARAM wparam
Definition: combo.c:716

Referenced by create_updown_control().

Variable Documentation

◆ add_updown_to_parent_seq

const struct message add_updown_to_parent_seq[]
static
Initial value:
= {
{ WM_NOTIFYFORMAT, sent|lparam, 0, NF_QUERY },
{ WM_QUERYUISTATE, sent|optional },
{ 0 }
}
#define WM_PARENTNOTIFY
Definition: winuser.h:1785
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define MAKELONG(a, b)
Definition: typedefs.h:248
Definition: msg.h:41
Definition: msg.h:34
#define NF_QUERY
Definition: winuser.h:2435
#define WM_CREATE
Definition: winuser.h:1590
static UINT WPARAM wparam
Definition: combo.c:716

Definition at line 79 of file updown.c.

Referenced by test_updown_create().

◆ add_updown_with_edit_seq

const struct message add_updown_with_edit_seq[]
static
Initial value:
= {
{ 0 }
}
#define TRUE
Definition: types.h:120
#define WM_NCCALCSIZE
Definition: winuser.h:1667
Definition: msg.h:39
#define SIZE_RESTORED
Definition: winuser.h:2480
#define WM_SIZE
Definition: winuser.h:1593
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
Definition: msg.h:34
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
static UINT WPARAM wparam
Definition: combo.c:716

Definition at line 71 of file updown.c.

Referenced by test_updown_buddy(), and test_updown_create().

◆ DWORD_PTR

Definition at line 67 of file updown.c.

◆ g_edit

◆ get_edit_text_seq

const struct message get_edit_text_seq[]
static
Initial value:
= {
{ 0 }
}
#define WM_GETTEXT
Definition: winuser.h:1600
Definition: msg.h:34

Definition at line 86 of file updown.c.

Referenced by test_updown_create().

◆ HINSTANCE

Definition at line 65 of file updown.c.

◆ HWND

Definition at line 65 of file updown.c.

Referenced by test_CreateUpDownControl(), and test_updown_buddy().

◆ INT

INT

Definition at line 65 of file updown.c.

Referenced by UpDownWindowProc().

◆ parent_wnd

◆ sequences

◆ SUBCLASSPROC

SUBCLASSPROC

Definition at line 67 of file updown.c.

◆ test_updown_base_seq

const struct message test_updown_base_seq[]
static
Initial value:
= {
{ 0 }
}
#define UDM_GETBASE
Definition: commctrl.h:2146
Definition: msg.h:34
#define UDM_SETBASE
Definition: commctrl.h:2145
static UINT WPARAM wparam
Definition: combo.c:716

Definition at line 138 of file updown.c.

Referenced by test_updown_base().

◆ test_updown_buddy_seq

const struct message test_updown_buddy_seq[]
static
Initial value:
= {
{ WM_STYLECHANGING, sent|defwinproc },
{ WM_STYLECHANGED, sent|defwinproc },
{ WM_STYLECHANGING, sent|defwinproc },
{ WM_STYLECHANGED, sent|defwinproc },
{ 0 }
}
#define WM_NCCALCSIZE
Definition: winuser.h:1667
Definition: msg.h:39
#define WM_MOVE
Definition: winuser.h:1592
Definition: msg.h:41
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
Definition: msg.h:34
#define UDM_SETBUDDY
Definition: commctrl.h:2141
#define UDM_GETBUDDY
Definition: commctrl.h:2142
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
static UINT WPARAM wparam
Definition: combo.c:716

Definition at line 123 of file updown.c.

Referenced by test_updown_buddy().

◆ test_updown_pos32_seq

const struct message test_updown_pos32_seq[]
static
Initial value:
= {
{ UDM_SETRANGE32, sent|lparam, 0, 1000 },
{ UDM_SETPOS32, sent|lparam, 0, 500 },
{ UDM_SETPOS32, sent|lparam, 0, 0 },
{ UDM_SETPOS32, sent|lparam, 0, -1 },
{ UDM_SETPOS32, sent|lparam, 0, 1000 },
{ UDM_SETPOS32, sent|lparam, 0, 1001 },
{ 0 }
}
#define UDM_GETPOS32
Definition: commctrl.h:2152
#define UDM_GETRANGE32
Definition: commctrl.h:2148
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define UDM_SETRANGE32
Definition: commctrl.h:2147
#define UDM_SETPOS32
Definition: commctrl.h:2151
Definition: msg.h:34

Definition at line 107 of file updown.c.

Referenced by test_updown_pos32().

◆ test_updown_pos_nochange_seq

const struct message test_updown_pos_nochange_seq[]
static
Initial value:
= {
{ WM_GETTEXT, sent|id, 0, 0, BUDDY_ID },
{ 0 }
}
#define WM_GETTEXT
Definition: winuser.h:1600
#define BUDDY_ID
Definition: updown.c:61
Definition: msg.h:34
GLenum GLuint id
Definition: glext.h:5579

Definition at line 162 of file updown.c.

Referenced by test_updown_pos(), and test_updown_pos32().

◆ test_updown_pos_notifications_horz_seq

const struct message test_updown_pos_notifications_horz_seq[]
static
Initial value:
= {
{ 0 }
}
#define EN_SETFOCUS
Definition: winuser.h:2009
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define SB_THUMBPOSITION
Definition: winuser.h:572
#define SB_ENDSCROLL
Definition: winuser.h:574
Definition: msg.h:41
Definition: msg.h:34
#define UDN_DELTAPOS
Definition: commctrl.h:2165
#define WM_COMMAND
Definition: winuser.h:1722
#define WM_CTLCOLOREDIT
Definition: winuser.h:1749
#define WM_HSCROLL
Definition: winuser.h:1725
GLenum GLuint id
Definition: glext.h:5579
#define EN_UPDATE
Definition: winuser.h:2010
#define WM_NOTIFY
Definition: richedit.h:61
static UINT WPARAM wparam
Definition: combo.c:716
#define EN_CHANGE
Definition: winuser.h:2004

Definition at line 180 of file updown.c.

Referenced by test_updown_pos_notifications().

◆ test_updown_pos_notifications_seq

const struct message test_updown_pos_notifications_seq[]
static
Initial value:
= {
{ 0 }
}
#define EN_SETFOCUS
Definition: winuser.h:2009
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define SB_THUMBPOSITION
Definition: winuser.h:572
#define SB_ENDSCROLL
Definition: winuser.h:574
Definition: msg.h:41
Definition: msg.h:34
#define UDN_DELTAPOS
Definition: commctrl.h:2165
#define WM_COMMAND
Definition: winuser.h:1722
#define WM_CTLCOLOREDIT
Definition: winuser.h:1749
GLenum GLuint id
Definition: glext.h:5579
#define EN_UPDATE
Definition: winuser.h:2010
#define WM_NOTIFY
Definition: richedit.h:61
static UINT WPARAM wparam
Definition: combo.c:716
#define WM_VSCROLL
Definition: winuser.h:1726
#define EN_CHANGE
Definition: winuser.h:2004

Definition at line 167 of file updown.c.

Referenced by test_updown_pos_notifications().

◆ test_updown_pos_seq

const struct message test_updown_pos_seq[]
static
Initial value:
= {
{ UDM_SETRANGE, sent|lparam, 0, MAKELONG(100,0) },
{ UDM_SETPOS, sent|lparam, 0, 5},
{ UDM_SETPOS, sent|lparam, 0, 0},
{ UDM_SETPOS, sent|lparam, 0, MAKELONG(-1,0)},
{ UDM_SETPOS, sent|lparam, 0, 100},
{ UDM_SETPOS, sent|lparam, 0, 101},
{ 0 }
}
#define UDM_GETPOS
Definition: commctrl.h:2140
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define UDM_SETRANGE
Definition: commctrl.h:2137
Definition: msg.h:34
#define UDM_SETPOS
Definition: commctrl.h:2139
#define UDM_GETRANGE
Definition: commctrl.h:2138

Definition at line 91 of file updown.c.

Referenced by test_updown_pos().

◆ test_updown_unicode_seq

const struct message test_updown_unicode_seq[]
static
Initial value:
= {
{ 0 }
}
Definition: msg.h:34
#define UDM_GETUNICODEFORMAT
Definition: commctrl.h:2150
static UINT WPARAM wparam
Definition: combo.c:716
#define UDM_SETUNICODEFORMAT
Definition: commctrl.h:2149

Definition at line 152 of file updown.c.

Referenced by test_updown_unicode().

◆ UINT_PTR

Definition at line 67 of file updown.c.