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");
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);
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); HGDIOBJ WINAPI GetStockObject(_In_ int)
static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static const struct message test_updown_pos_notifications_horz_seq[]
#define NUM_MSG_SEQUENCES
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
static void test_CreateUpDownControl(void)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
static LRESULT WINAPI updown_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static void test_updown_unicode(void)
static void test_updown_pos(void)
GLenum GLuint GLenum GLsizei const GLchar * message
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
GLint GLint GLint GLint GLint x
static void test_updown_pos_notifications(void)
HWND WINAPI SetFocus(_In_opt_ HWND)
static const struct message test_updown_pos_nochange_seq[]
BOOL WINAPI DestroyWindow(_In_ HWND)
static BOOL register_parent_wnd_class(void)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static void test_updown_base(void)
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
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)
static UINT WPARAM LPARAM lparam
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
static void init_msg_sequences(struct msg_sequence **seq, int n)
static HWND create_parent_window(void)
static HWND create_updown_control(DWORD style, HWND buddy)
HWND WINAPI GetDesktopWindow(void)
static void init_functions(void)
#define GetWindowLongPtrA
BOOL WINAPI SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIDSubclass, DWORD_PTR dwRef)
#define expect(EXPECTED, GOT)
BOOL WINAPI SetWindowTextA(_In_ HWND, _In_opt_ LPCSTR)
#define WM_WINDOWPOSCHANGING
#define ok_sequence(seq, index, exp, contx, todo)
static const struct message add_updown_to_parent_seq[]
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
static const struct message get_edit_text_seq[]
#define SetWindowLongPtrA
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static void test_updown_buddy(void)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
static const struct message add_updown_with_edit_seq[]
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
static const struct message test_updown_buddy_seq[]
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
int WINAPI lstrlenA(LPCSTR lpString)
static void test_updown_pos32(void)
static LRESULT WINAPI edit_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
static BOOL(WINAPI *pSetWindowSubclass)(HWND
HANDLE WINAPI GetPropA(_In_ HWND, _In_ LPCSTR)
static void flush_sequences(struct msg_sequence **seq, int n)
static HWND create_edit_control(void)
LONG WINAPI SetWindowLongA(_In_ HWND, _In_ int, _In_ LONG)
GLint GLint GLint GLint GLint GLint y
static void test_UDS_SETBUDDYINT(void)
#define WM_WINDOWPOSCHANGED
char * strcpy(char *DstString, const char *SrcString)
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)
static const struct message test_updown_pos32_seq[]
static void test_updown_create(void)
static const struct message test_updown_base_seq[]
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define UDM_GETUNICODEFORMAT
static const struct message test_updown_unicode_seq[]
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
static const struct message test_updown_pos_seq[]
static const struct message test_updown_pos_notifications_seq[]
static UINT WPARAM wparam
#define UDM_SETUNICODEFORMAT