53#define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT))
55#define NUM_MSG_SEQUENCES 3
56#define PARENT_SEQ_INDEX 0
57#define EDIT_SEQ_INDEX 1
58#define UPDOWN_SEQ_INDEX 2
195 static LONG defwndproc_counter = 0;
219 defwndproc_counter++;
221 defwndproc_counter--;
249 "Up-Down test parent window",
259 static LONG defwndproc_counter = 0;
271 defwndproc_counter++;
273 defwndproc_counter--;
299 static LONG defwndproc_counter = 0;
311 defwndproc_counter++;
313 defwndproc_counter--;
328 ok(updown !=
NULL,
"Failed to create UpDown control.\n");
329 if (!updown)
return NULL;
417 "test updown pos, no change",
FALSE);
481 win_skip(
"UDM_SETRANGE32/UDM_GETRANGE32 not available\n");
493 win_skip(
"UDM_SETPOS32 and UDM_GETPOS32 need 5.80\n");
546 "test updown pos, no change",
FALSE);
553 HWND updown, buddyReturn, buddy;
563 ok(buddyReturn ==
g_edit,
"Expected edit handle\n");
566 ok(buddyReturn ==
g_edit,
"Expected edit handle\n");
569 ok(buddyReturn ==
g_edit,
"Expected edit handle\n");
594 if (pSetWindowSubclass)
597 ok(
GetPropA(buddy,
"CC32SubclassInfo") !=
NULL,
"Expected CC32SubclassInfo property\n");
607 ok(buddyReturn ==
g_edit,
"Unexpected buddy window.\n");
612 ok(buddyReturn ==
g_edit,
"Unexpected buddy window.\n");
624 ok(buddyReturn ==
NULL,
"Unexpected buddy window.\n");
635 ok(buddyReturn ==
g_edit,
"Unexpected buddy window.\n");
640 ok(buddyReturn ==
g_edit,
"Unexpected buddy window.\n");
651 ok(updown !=
NULL,
"Failed to create UpDown control.\n");
655 ok(buddyReturn ==
NULL,
"Unexpected buddy window.\n");
667 ok(buddyReturn ==
NULL,
"Unexpected buddy window.\n");
671 ok(buddyReturn ==
g_edit,
"Unexpected buddy window.\n");
761 win_skip(
"UDM_SETUNICODEFORMAT not available\n");
787 ok(updown !=
NULL,
"Failed to create updown control\n");
794 ok(!*
text,
"Expected empty string\n");
802 ok(updown !=
NULL,
"Failed to create updown control\n");
805 ok(
r.right > 0,
"Expected default width, got %d\n",
r.right);
810 ok(updown !=
NULL,
"Failed to create updown control\n");
813 ok(
r.right != 2 &&
r.right > 0,
"Expected default width, got %d\n",
r.right);
818 ok(updown !=
NULL,
"Failed to create updown control\n");
821 ok(
r.right < 100 &&
r.right > 0,
"Expected default width, got %d\n",
r.right);
826 ok(updown !=
NULL,
"Failed to create updown control\n");
829 ok(
r.bottom == 0,
"Expected zero height, got %d\n",
r.bottom);
834 ok(updown !=
NULL,
"Failed to create updown control\n");
837 ok(
r.bottom == 0,
"Expected zero height, got %d\n",
r.bottom);
842 ok(updown !=
NULL,
"Failed to create updown control\n");
845 ok(
r.bottom < 100 &&
r.bottom > 0,
"Expected default height, got %d\n",
r.bottom);
868 ok(!*
text,
"Expected empty string\n");
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");
919 ok(buddy ==
g_edit,
"Unexpected buddy window.\n");
952 "test updown to parent notify (vertical)",
FALSE);
971 "test updown to parent notify (horizontal)",
FALSE);
980#define X(f) p##f = (void*)GetProcAddress(hComCtl32, #f);
981#define X2(f, ord) p##f = (void*)GetProcAddress(hComCtl32, (const char *)ord);
char * strcpy(char *DstString, const char *SrcString)
static void init_msg_sequences(struct msg_sequence **seq, int n)
static void flush_sequences(struct msg_sequence **seq, int n)
BOOL WINAPI SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIDSubclass, DWORD_PTR dwRef)
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)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble r
static HWND create_parent_window(void)
static void test_updown_pos_notifications(void)
static void test_updown_create(void)
static LRESULT WINAPI edit_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static const struct message test_updown_pos_seq[]
#define NUM_MSG_SEQUENCES
static void test_updown_base(void)
static const struct message test_updown_pos32_seq[]
static HWND create_updown_control(DWORD style, HWND buddy)
static BOOL register_parent_wnd_class(void)
static void test_updown_pos32(void)
static const struct message add_updown_to_parent_seq[]
static LRESULT WINAPI updown_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static const struct message get_edit_text_seq[]
static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
static const struct message test_updown_unicode_seq[]
static const struct message test_updown_buddy_seq[]
static const struct message test_updown_base_seq[]
static const struct message test_updown_pos_notifications_seq[]
static void test_updown_pos(void)
static void test_updown_buddy(void)
#define expect(EXPECTED, GOT)
static const struct message test_updown_pos_nochange_seq[]
static const struct message add_updown_with_edit_seq[]
static void test_CreateUpDownControl(void)
static HWND create_edit_control(void)
static void test_updown_unicode(void)
static const struct message test_updown_pos_notifications_horz_seq[]
static void init_functions(void)
static void test_UDS_SETBUDDYINT(void)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define UDM_GETUNICODEFORMAT
#define UDM_SETUNICODEFORMAT
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define SetWindowLongPtrA
BOOL WINAPI SetWindowTextA(_In_ HWND, _In_opt_ LPCSTR)
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)
HANDLE WINAPI GetPropA(_In_ HWND, _In_ LPCSTR)
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_WINDOWPOSCHANGING
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
LONG WINAPI SetWindowLongA(_In_ HWND, _In_ int, _In_ LONG)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GetWindowLongPtrA
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
HWND WINAPI SetFocus(_In_opt_ HWND)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
#define WM_WINDOWPOSCHANGED
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)