Commit f2b4634c authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

comctl32/tests: Enable compilation with long types.

parent 91b705dc
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = comctl32.dll
IMPORTS = ole32 user32 gdi32 advapi32
......
......@@ -136,13 +136,13 @@ static void test_play(void)
res = SendMessageA(hAnimateWnd, ACM_OPENA,(WPARAM)shell32, MAKEINTRESOURCE(INVALID_AVI_INDEX));
err = GetLastError();
ok(res == 0, "Invalid video should have failed\n");
ok(err == ERROR_RESOURCE_NAME_NOT_FOUND, "Expected 1814, got %u\n", err);
ok(err == ERROR_RESOURCE_NAME_NOT_FOUND, "Expected 1814, got %lu\n", err);
SetLastError(0xdeadbeef);
res = SendMessageA(hAnimateWnd, ACM_PLAY, (WPARAM) -1, MAKELONG(0, -1));
err = GetLastError();
ok(res == 0, "Play should have failed\n");
ok(err == 0xdeadbeef, "Expected 0xdeadbeef, got %u\n", err);
ok(err == 0xdeadbeef, "Expected 0xdeadbeef, got %lu\n", err);
destroy_animate();
create_animate(0, 0);
......
......@@ -35,7 +35,7 @@
#define expect(expected,got) expect_(__LINE__, expected, got)
static inline void expect_(unsigned line, DWORD expected, DWORD got)
{
ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got);
ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got);
}
typedef struct _STREAMDATA
......@@ -96,13 +96,13 @@ static void init_functions(void)
/* Callbacks */
static INT CALLBACK CB_CmpLT(PVOID p1, PVOID p2, LPARAM lp)
{
ok(lp == 0x1abe11ed, "lp=%ld\n", lp);
ok(lp == 0x1abe11ed, "lp=%Id\n", lp);
return p1 < p2 ? -1 : p1 > p2 ? 1 : 0;
}
static INT CALLBACK CB_CmpGT(PVOID p1, PVOID p2, LPARAM lp)
{
ok(lp == 0x1abe11ed, "lp=%ld\n", lp);
ok(lp == 0x1abe11ed, "lp=%Id\n", lp);
return p1 > p2 ? -1 : p1 < p2 ? 1 : 0;
}
......@@ -115,14 +115,14 @@ static INT nMessages[4];
static PVOID CALLBACK CB_MergeInsertSrc(UINT op, PVOID p1, PVOID p2, LPARAM lp)
{
nMessages[op]++;
ok(lp == 0x1abe11ed, "lp=%ld\n", lp);
ok(lp == 0x1abe11ed, "lp=%Id\n", lp);
return p1;
}
static PVOID CALLBACK CB_MergeDeleteOddSrc(UINT op, PVOID p1, PVOID p2, LPARAM lp)
{
nMessages[op]++;
ok(lp == 0x1abe11ed, "lp=%ld\n", lp);
ok(lp == 0x1abe11ed, "lp=%Id\n", lp);
return ((PCHAR)p2)+1;
}
......@@ -209,12 +209,12 @@ static void test_dpa(void)
GetSystemInfo(&si);
hHeap = HeapCreate(0, 1, 2);
ok(hHeap != NULL, "error=%d\n", GetLastError());
ok(hHeap != NULL, "error=%ld\n", GetLastError());
dpa3 = pDPA_CreateEx(0, hHeap);
ok(dpa3 != NULL, "\n");
ret = pDPA_Grow(dpa3, si.dwPageSize + 1);
ok(!ret && GetLastError() == ERROR_NOT_ENOUGH_MEMORY,
"ret=%d error=%d\n", ret, GetLastError());
"ret=%d error=%ld\n", ret, GetLastError());
dpa = pDPA_Create(0);
ok(dpa != NULL, "\n");
......@@ -224,7 +224,7 @@ static void test_dpa(void)
/* Fill the created gap */
ok(pDPA_SetPtr(dpa, 0, (PVOID)5), "\n");
rc=CheckDPA(dpa, 0x56, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
/* Prepend item */
ret = pDPA_InsertPtr(dpa, 1, (PVOID)1);
......@@ -240,7 +240,7 @@ static void test_dpa(void)
ok(ret == 5, "ret=%d\n", ret);
rc=CheckDPA(dpa, 0x516324, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
for(i = 1; i <= 6; i++)
{
......@@ -254,28 +254,28 @@ static void test_dpa(void)
/* Sort DPA */
ok(pDPA_Sort(dpa, CB_CmpGT, 0x1abe11ed), "\n");
rc=CheckDPA(dpa, 0x654321, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
/* Clone into a new DPA */
dpa2 = pDPA_Clone(dpa, NULL);
ok(dpa2 != NULL, "\n");
/* The old data should have been preserved */
rc=CheckDPA(dpa2, 0x654321, &dw2);
ok(rc, "dw=0x%x\n", dw2);
ok(rc, "dw=0x%lx\n", dw2);
ok(pDPA_Sort(dpa, CB_CmpLT, 0x1abe11ed), "\n");
/* Test if the DPA itself was really copied */
rc=CheckDPA(dpa, 0x123456, &dw);
ok(rc, "dw=0x%x\n", dw );
ok(rc, "dw=0x%lx\n", dw );
rc=CheckDPA(dpa2, 0x654321, &dw2);
ok(rc, "dw2=0x%x\n", dw2);
ok(rc, "dw2=0x%lx\n", dw2);
/* Clone into an old DPA */
SetLastError(ERROR_SUCCESS);
p = pDPA_Clone(dpa, dpa3);
ok(p == dpa3, "p=%p\n", p);
rc=CheckDPA(dpa3, 0x123456, &dw3);
ok(rc, "dw3=0x%x\n", dw3);
ok(rc, "dw3=0x%lx\n", dw3);
for(i = 1; i <= 6; i++)
{
......@@ -309,7 +309,7 @@ static void test_dpa(void)
p = pDPA_DeletePtr(dpa, 2);
ok(p == (PVOID)3, "p=%p\n", p);
rc=CheckDPA(dpa, 0x12456, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
/* Check where to re-insert the deleted item */
i = pDPA_Search(dpa, (PVOID)3, 0,
......@@ -328,7 +328,7 @@ static void test_dpa(void)
ret = pDPA_InsertPtr(dpa, 2, (PVOID)3);
ok(ret == 2, "ret=%d i=%d\n", ret, 2);
rc=CheckDPA(dpa, 0x123456, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
/* When doing a binary search while claiming reverse order all indexes
* should be bogus */
......@@ -346,7 +346,7 @@ static void test_dpa(void)
pDPA_DeleteAllPtrs(dpa2);
rc=CheckDPA(dpa2, 0, &dw2);
ok(rc, "dw2=0x%x\n", dw2);
ok(rc, "dw2=0x%lx\n", dw2);
pDPA_Destroy(dpa);
pDPA_Destroy(dpa2);
......@@ -372,7 +372,7 @@ static void test_DPA_Merge(void)
ok(ret == 2, "ret=%d\n", ret);
rc = CheckDPA(dpa, 0x135, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
for (i = 0; i < 6; i++)
{
......@@ -383,16 +383,16 @@ static void test_DPA_Merge(void)
}
rc = CheckDPA(dpa2, 0x654321, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
rc = CheckDPA(dpa3, 0x123456, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
/* Delete all odd entries from dpa2 */
memset(nMessages, 0, sizeof(nMessages));
pDPA_Merge(dpa2, dpa, DPAM_INTERSECT,
CB_CmpLT, CB_MergeDeleteOddSrc, 0x1abe11ed);
rc = CheckDPA(dpa2, 0x246, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
expect(3, nMessages[DPAMM_MERGE]);
expect(3, nMessages[DPAMM_DELETE]);
......@@ -409,7 +409,7 @@ static void test_DPA_Merge(void)
pDPA_Merge(dpa2, dpa, DPAM_INTERSECT,
CB_CmpLT, CB_MergeInsertSrc, 0x1abe11ed);
rc = CheckDPA(dpa2, 0x135, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
expect(3, nMessages[DPAMM_MERGE]);
expect(6, nMessages[DPAMM_DELETE]);
......@@ -431,7 +431,7 @@ static void test_DPA_Merge(void)
rc = CheckDPA(dpa2, 0x123456, &dw);
ok(rc ||
broken(!rc && dw == 0x23456), /* 4.7x */
"dw=0x%x\n", dw);
"dw=0x%lx\n", dw);
expect(0, nMessages[DPAMM_MERGE]);
expect(0, nMessages[DPAMM_DELETE]);
......@@ -463,13 +463,13 @@ static void test_DPA_Merge(void)
"Expected 3, got %d\n", nMessages[DPAMM_INSERT]);
rc = CheckDPA(dpa, 0x123456, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
rc = CheckDPA(dpa2, 0x123456, &dw);
ok(rc ||
broken(!rc), /* win98 */
"dw=0x%x\n", dw);
"dw=0x%lx\n", dw);
rc = CheckDPA(dpa3, 0x123456, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
pDPA_Destroy(dpa);
pDPA_Destroy(dpa2);
......@@ -492,13 +492,13 @@ static void test_DPA_EnumCallback(void)
}
rc = CheckDPA(dpa, 0x123456, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
nEnum = 0;
/* test callback sets first 3 items to 7 */
pDPA_EnumCallback(dpa, CB_EnumFirstThree, dpa);
rc = CheckDPA(dpa, 0x777456, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
ok(nEnum == 3, "nEnum=%d\n", nEnum);
pDPA_Destroy(dpa);
......@@ -535,7 +535,7 @@ static void test_DPA_LoadStream(void)
HDPA dpa;
hRes = CoInitialize(NULL);
ok(hRes == S_OK, "Failed to initialize COM, hr %#x.\n", hRes);
ok(hRes == S_OK, "Failed to initialize COM, hr %#lx.\n", hRes);
dwMode = STGM_DIRECT|STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE;
hRes = StgCreateDocfile(NULL, dwMode|STGM_DELETEONRELEASE, 0, &pStg);
......@@ -622,10 +622,10 @@ static void test_DPA_LoadStream(void)
expect(E_FAIL, hRes);
ret = IStream_Release(pStm);
ok(!ret, "ret=%d\n", ret);
ok(!ret, "ret=%ld\n", ret);
ret = IStorage_Release(pStg);
ok(!ret, "ret=%d\n", ret);
ok(!ret, "ret=%ld\n", ret);
CoUninitialize();
}
......@@ -643,7 +643,7 @@ static void test_DPA_SaveStream(void)
LARGE_INTEGER liZero;
hRes = CoInitialize(NULL);
ok(hRes == S_OK, "Failed to initialize COM, hr %#x.\n", hRes);
ok(hRes == S_OK, "Failed to initialize COM, hr %#lx.\n", hRes);
dwMode = STGM_DIRECT|STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE;
hRes = StgCreateDocfile(NULL, dwMode|STGM_DELETEONRELEASE, 0, &pStg);
......@@ -657,7 +657,7 @@ static void test_DPA_SaveStream(void)
/* simple parameter check */
hRes = pDPA_SaveStream(dpa, NULL, pStm, NULL);
ok(hRes == E_INVALIDARG ||
broken(hRes == S_OK) /* XP and below */, "Wrong result, %d\n", hRes);
broken(hRes == S_OK) /* XP and below */, "Wrong result, %ld\n", hRes);
if (0) {
/* crashes on XP */
hRes = pDPA_SaveStream(NULL, CB_Save, pStm, NULL);
......@@ -688,7 +688,7 @@ if (0) {
hRes = pDPA_LoadStream(&dpa, CB_Load, pStm, (void*)0xdeadbeef);
expect(S_OK, hRes);
rc = CheckDPA(dpa, 0x123456, &dw);
ok(rc, "dw=0x%x\n", dw);
ok(rc, "dw=0x%lx\n", dw);
pDPA_Destroy(dpa);
ret = IStream_Release(pStm);
......
......@@ -219,7 +219,7 @@ static void test_Alloc(void)
size = pGetSize(p);
ok(size == 1 ||
broken(size == min), /* win9x */
"Expected 1, got %d\n", size);
"Expected 1, got %ld\n", size);
/* reallocate the block */
p = pReAlloc(p, 2);
......@@ -229,7 +229,7 @@ static void test_Alloc(void)
size = pGetSize(p);
ok(size == 2 ||
broken(size == min), /* win9x */
"Expected 2, got %d\n", size);
"Expected 2, got %ld\n", size);
/* free the block */
res = pFree(p);
......@@ -279,7 +279,7 @@ static void test_LoadIconWithScaleDown(void)
GetTempFileNameW(tmp_path, L"ICO", 0, icon_path);
handle = CreateFileW(icon_path, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
ok(handle != INVALID_HANDLE_VALUE, "CreateFileW failed with error %u\n", GetLastError());
ok(handle != INVALID_HANDLE_VALUE, "CreateFileW failed with error %lu\n", GetLastError());
res = WriteFile(handle, testicon_data, sizeof(testicon_data), &written, NULL);
ok(res && written == sizeof(testicon_data), "Failed to write icon file\n");
CloseHandle(handle);
......@@ -296,43 +296,43 @@ static void test_LoadIconWithScaleDown(void)
/* invalid arguments */
icon = (HICON)0x1234;
hr = pLoadIconMetric(NULL, (LPWSTR)IDI_APPLICATION, 0x100, &icon);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %x\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %lx\n", hr);
ok(icon == NULL, "Expected NULL, got %p\n", icon);
icon = (HICON)0x1234;
hr = pLoadIconMetric(NULL, NULL, LIM_LARGE, &icon);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %x\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %lx\n", hr);
ok(icon == NULL, "Expected NULL, got %p\n", icon);
icon = (HICON)0x1234;
hr = pLoadIconWithScaleDown(NULL, NULL, 32, 32, &icon);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %x\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %lx\n", hr);
ok(icon == NULL, "Expected NULL, got %p\n", icon);
/* non-existing filename */
hr = pLoadIconMetric(NULL, L"nonexisting.ico", LIM_LARGE, &icon);
ok(hr == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND) || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) /* Win7 */,
"Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %x\n", hr);
"Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %lx\n", hr);
hr = pLoadIconWithScaleDown(NULL, L"nonexisting.ico", 32, 32, &icon);
todo_wine
ok(hr == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND),
"Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %x\n", hr);
"Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %lx\n", hr);
/* non-existing resource name */
hr = pLoadIconMetric(hinst, L"Nonexisting", LIM_LARGE, &icon);
ok(hr == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND),
"Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %x\n", hr);
"Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %lx\n", hr);
hr = pLoadIconWithScaleDown(hinst, L"Noneexisting", 32, 32, &icon);
ok(hr == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND),
"Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %x\n", hr);
"Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %lx\n", hr);
/* load icon using predefined identifier */
hr = pLoadIconMetric(NULL, (LPWSTR)IDI_APPLICATION, LIM_SMALL, &icon);
ok(hr == S_OK, "Expected S_OK, got %x\n", hr);
ok(hr == S_OK, "Expected S_OK, got %lx\n", hr);
res = GetIconInfo(icon, &info);
ok(res, "Failed to get icon info, error %u\n", GetLastError());
ok(res, "Failed to get icon info, error %lu\n", GetLastError());
bytes = GetObjectA(info.hbmColor, sizeof(bmp), &bmp);
ok(bytes > 0, "Failed to get bitmap info for icon\n");
ok(bmp.bmWidth == GetSystemMetrics(SM_CXSMICON), "Wrong icon width %d\n", bmp.bmWidth);
......@@ -340,9 +340,9 @@ static void test_LoadIconWithScaleDown(void)
DestroyIcon(icon);
hr = pLoadIconMetric(NULL, (LPWSTR)IDI_APPLICATION, LIM_LARGE, &icon);
ok(hr == S_OK, "Expected S_OK, got %x\n", hr);
ok(hr == S_OK, "Expected S_OK, got %lx\n", hr);
res = GetIconInfo(icon, &info);
ok(res, "Failed to get icon info, error %u\n", GetLastError());
ok(res, "Failed to get icon info, error %lu\n", GetLastError());
bytes = GetObjectA(info.hbmColor, sizeof(bmp), &bmp);
ok(bytes > 0, "Failed to get bitmap info for icon\n");
ok(bmp.bmWidth == GetSystemMetrics(SM_CXICON), "Wrong icon width %d\n", bmp.bmWidth);
......@@ -350,9 +350,9 @@ static void test_LoadIconWithScaleDown(void)
DestroyIcon(icon);
hr = pLoadIconWithScaleDown(NULL, (LPWSTR)IDI_APPLICATION, 42, 42, &icon);
ok(hr == S_OK, "Expected S_OK, got %x\n", hr);
ok(hr == S_OK, "Expected S_OK, got %lx\n", hr);
res = GetIconInfo(icon, &info);
ok(res, "Failed to get icon info, error %u\n", GetLastError());
ok(res, "Failed to get icon info, error %lu\n", GetLastError());
bytes = GetObjectA(info.hbmColor, sizeof(bmp), &bmp);
ok(bytes > 0, "Failed to get bitmap info for icon\n");
ok(bmp.bmWidth == 42, "Wrong icon width %d\n", bmp.bmWidth);
......@@ -361,9 +361,9 @@ static void test_LoadIconWithScaleDown(void)
/* load icon from file */
hr = pLoadIconMetric(NULL, icon_path, LIM_SMALL, &icon);
ok(hr == S_OK, "Expected S_OK, got %x\n", hr);
ok(hr == S_OK, "Expected S_OK, got %lx\n", hr);
res = GetIconInfo(icon, &info);
ok(res, "Failed to get icon info, error %u\n", GetLastError());
ok(res, "Failed to get icon info, error %lu\n", GetLastError());
bytes = GetObjectA(info.hbmColor, sizeof(bmp), &bmp);
ok(bytes > 0, "Failed to get bitmap info for icon\n");
ok(bmp.bmWidth == GetSystemMetrics(SM_CXSMICON), "Wrong icon width %d\n", bmp.bmWidth);
......@@ -371,9 +371,9 @@ static void test_LoadIconWithScaleDown(void)
DestroyIcon(icon);
hr = pLoadIconWithScaleDown(NULL, icon_path, 42, 42, &icon);
ok(hr == S_OK, "Expected S_OK, got %x\n", hr);
ok(hr == S_OK, "Expected S_OK, got %lx\n", hr);
res = GetIconInfo(icon, &info);
ok(res, "Failed to get icon info, error %u\n", GetLastError());
ok(res, "Failed to get icon info, error %lu\n", GetLastError());
bytes = GetObjectA(info.hbmColor, sizeof(bmp), &bmp);
ok(bytes > 0, "Failed to get bitmap info for icon\n");
ok(bmp.bmWidth == 42, "Wrong icon width %d\n", bmp.bmWidth);
......@@ -522,7 +522,7 @@ static HWND create_control(const char *class, DWORD style, HWND parent, DWORD_PT
if (parent)
style |= WS_CHILD;
hwnd = CreateWindowExA(0, class, "test", style, 0, 0, 50, 20, parent, 0, 0, NULL);
ok(!!hwnd, "Failed to create %s style %#x parent %p\n", class, style, parent);
ok(!!hwnd, "Failed to create %s style %#lx parent %p\n", class, style, parent);
pSetWindowSubclass(hwnd, test_wm_themechanged_proc, 0, data);
return hwnd;
}
......@@ -637,13 +637,13 @@ static void test_WM_SYSCOLORCHANGE(void)
parent = CreateWindowExA(0, WC_STATICA, "parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 100, 100,
200, 200, 0, 0, 0, NULL);
ok(!!parent, "CreateWindowExA failed, error %d\n", GetLastError());
ok(!!parent, "CreateWindowExA failed, error %ld\n", GetLastError());
temp.tmplate.style = WS_CHILD | WS_VISIBLE;
temp.tmplate.cx = 50;
temp.tmplate.cy = 50;
dialog = CreateDialogIndirectParamA(NULL, &temp.tmplate, parent, wm_syscolorchange_dlg_proc, 0);
ok(!!dialog, "CreateDialogIndirectParamA failed, error %d\n", GetLastError());
ok(!!dialog, "CreateDialogIndirectParamA failed, error %ld\n", GetLastError());
flush_events();
flush_sequences(sequences, NUM_MSG_SEQUENCES);
......@@ -917,15 +917,15 @@ static void test_themed_background(void)
parent = CreateWindowA(cls.lpszClassName, "parent", WS_POPUP | WS_VISIBLE, 100, 100, 100, 100,
0, 0, 0, 0);
ok(parent != NULL, "CreateWindowA failed, error %u.\n", GetLastError());
ok(parent != NULL, "CreateWindowA failed, error %lu.\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
winetest_push_context("%s %#x", tests[i].class_name, tests[i].style);
winetest_push_context("%s %#lx", tests[i].class_name, tests[i].style);
child = CreateWindowA(tests[i].class_name, " ", WS_CHILD | WS_VISIBLE | tests[i].style,
0, 0, 50, 50, parent, 0, 0, 0);
ok(child != NULL, "CreateWindowA failed, error %u.\n", GetLastError());
ok(child != NULL, "CreateWindowA failed, error %lu.\n", GetLastError());
flush_events();
flush_sequences(sequences, NUM_MSG_SEQUENCES);
......@@ -953,17 +953,17 @@ static void test_themed_background(void)
color = GetPixel(hdc, 40, 40);
/* BS_PUSHBOX is unimplemented on Wine */
todo_wine_if(i == 11)
ok(color == 0x808080, "Expected color %#x, got %#x.\n", 0x808080, color);
ok(color == 0x808080, "Expected color %#x, got %#lx.\n", 0x808080, color);
}
else if (tests[i].seq == groupbox_seq)
{
/* DrawThemeParentBackground() is used to fill content background */
color = GetPixel(hdc, 40, 40);
ok(color == 0xff, "Expected color %#x, got %#x.\n", 0xff, color);
ok(color == 0xff, "Expected color %#x, got %#lx.\n", 0xff, color);
/* WM_CTLCOLORSTATIC is used to fill text background */
color = GetPixel(hdc, 10, 10);
ok(color == 0x808080, "Expected color %#x, got %#x.\n", 0x808080, color);
ok(color == 0x808080, "Expected color %#x, got %#lx.\n", 0x808080, color);
}
ReleaseDC(child, hdc);
......
......@@ -35,15 +35,15 @@
#define expect(expected,got) expect_(__LINE__, expected, got)
static inline void expect_(unsigned line, DWORD expected, DWORD got)
{
ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got);
ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got);
}
#define expect_hex(expected,got) expect_hex_(__LINE__, expected, got)
static inline void expect_hex_(unsigned line, DWORD expected, DWORD got)
{
ok_(__FILE__, line)(expected == got, "Expected %x, got %x\n", expected, got);
ok_(__FILE__, line)(expected == got, "Expected %lx, got %lx\n", expected, got);
}
#define expect_d(expected, got) ok(abs((expected) - (got)) <= 2, "Expected %d, got %d\n", expected, got);
#define expect_d(expected, got) ok(abs((expected) - (got)) <= 2, "Expected %ld, got %ld\n", expected, got);
#define NUM_MSG_SEQUENCES 2
#define PARENT_SEQ_INDEX 0
......@@ -285,7 +285,7 @@ static void test_monthcal(void)
limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st);
ok(limits == 0 ||
broken(limits == GDTR_MIN), /* comctl32 <= 4.70 */
"No limits should be set (%d)\n", limits);
"No limits should be set (%ld)\n", limits);
if (limits == GDTR_MIN)
{
win_skip("comctl32 <= 4.70 is broken\n");
......@@ -318,7 +318,7 @@ static void test_monthcal(void)
expect(0, st[1].wMilliseconds);
limits = SendMessageA(hwnd, MCM_GETRANGE, 0, 0);
ok(limits == 0, "got %u\n", limits);
ok(limits == 0, "got %lu\n", limits);
GetSystemTime(&st[0]);
st[1] = st[0];
......@@ -468,7 +468,7 @@ static void test_monthcal(void)
/* 0 limit flags */
limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1);
ok(limits == GDTR_MIN, "got 0x%08x\n", limits);
ok(limits == GDTR_MIN, "got 0x%08lx\n", limits);
GetSystemTime(st);
st[1] = st[0];
......@@ -477,7 +477,7 @@ static void test_monthcal(void)
ok(r, "got %d\n", r);
limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st);
ok(limits == 0, "got 0x%08x\n", limits);
ok(limits == 0, "got 0x%08lx\n", limits);
ok(st[0].wYear == 0 && st[1].wYear == 0, "got %u, %u\n", st[0].wYear, st[1].wYear);
/* flags are 0, set min limit */
......@@ -489,7 +489,7 @@ static void test_monthcal(void)
ok(r, "got %d\n", r);
limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1);
ok(limits == GDTR_MIN, "got 0x%08x\n", limits);
ok(limits == GDTR_MIN, "got 0x%08lx\n", limits);
ok(st1[1].wYear == 0, "got %u\n", st1[1].wYear);
/* now set max limit, check flags */
......@@ -497,7 +497,7 @@ static void test_monthcal(void)
ok(r, "got %d\n", r);
limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1);
ok(limits == GDTR_MAX, "got 0x%08x\n", limits);
ok(limits == GDTR_MAX, "got 0x%08lx\n", limits);
ok(st1[0].wYear == 0, "got %u\n", st1[0].wYear);
DestroyWindow(hwnd);
......@@ -652,7 +652,7 @@ static LRESULT WINAPI monthcal_subclass_proc(HWND hwnd, UINT message, WPARAM wPa
message == WM_STYLECHANGED) && lParam)
{
STYLESTRUCT *style = (STYLESTRUCT*)lParam;
trace("\told style: 0x%08x, new style: 0x%08x\n", style->styleOld, style->styleNew);
trace("\told style: 0x%08lx, new style: 0x%08lx\n", style->styleOld, style->styleNew);
}
defwndproc_counter++;
......@@ -927,7 +927,7 @@ static void test_firstDay(void)
SetLastError(0xdeadbeef);
ret = GetLocaleInfoA(lcid, LOCALE_ICALENDARTYPE, caltype, 3);
if (ret == 0) {
skip("Must know local calendar type (%x)\n", GetLastError());
skip("Must know local calendar type (%lx)\n", GetLastError());
return;
} else if (atoi(caltype) != CAL_GREGORIAN) {
skip("MonthCalendar Control only supports Gregorian calendar (type: %s)\n", caltype);
......@@ -1236,7 +1236,7 @@ if (0)
break;
todo_wine_if(title_hits[title_index].todo)
ok(title_hits[title_index].ht == res, "Expected %x, got %x, pos %d\n",
ok(title_hits[title_index].ht == res, "Expected %x, got %x, pos %ld\n",
title_hits[title_index].ht, res, x);
}
old_res = res;
......@@ -1841,7 +1841,7 @@ static void test_hittest_v6(void)
expect(0, mchit.rc.left);
expect(0, mchit.rc.top);
expect_d(r.right, mchit.rc.right);
ok(mchit.rc.bottom > 0, "got %d\n", mchit.rc.bottom);
ok(mchit.rc.bottom > 0, "got %ld\n", mchit.rc.bottom);
/* between two calendars */
MoveWindow(hwnd, 0, 0, r.right * 5/2, r.bottom, FALSE);
......@@ -1907,7 +1907,7 @@ static void test_MCM_SIZERECTTOMIN(void)
}
ret = SendMessageA(hwnd, MCM_SIZERECTTOMIN, 0, 0);
ok(ret == 0, "got %d\n", ret);
ok(ret == 0, "got %ld\n", ret);
SetRectEmpty(&r);
ret = SendMessageA(hwnd, MCM_SIZERECTTOMIN, 0, (LPARAM)&r);
......@@ -1917,18 +1917,18 @@ static void test_MCM_SIZERECTTOMIN(void)
DestroyWindow(hwnd);
return;
}
ok(ret == 1, "got %d\n", ret);
ok(r.left == 0 && r.right > 0, "got %d, %d\n", r.left, r.right);
ok(ret == 1, "got %ld\n", ret);
ok(r.left == 0 && r.right > 0, "got %ld, %ld\n", r.left, r.right);
r = r2;
ret = SendMessageA(hwnd, MCM_SIZERECTTOMIN, 0, (LPARAM)&r);
ok(ret == 1, "got %d\n", ret);
ok(ret == 1, "got %ld\n", ret);
r2.right = (r2.right - r2.left) * 3;
r2.bottom = (r2.bottom - r2.top) * 3;
r2.left = r2.top = 0;
ret = SendMessageA(hwnd, MCM_SIZERECTTOMIN, 0, (LPARAM)&r2);
ok(ret == 1, "got %d\n", ret);
ok(ret == 1, "got %ld\n", ret);
DestroyWindow(hwnd);
}
......@@ -1984,7 +1984,7 @@ static void test_daystate(void)
/* try to switch on */
SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) | MCS_DAYSTATE);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok((style & MCS_DAYSTATE) == 0, "got 0x%08x\n", style);
ok((style & MCS_DAYSTATE) == 0, "got 0x%08lx\n", style);
DestroyWindow(hwnd);
......@@ -2006,7 +2006,7 @@ static void test_daystate(void)
/* try to switch off */
SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) & ~MCS_DAYSTATE);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok((style & MCS_DAYSTATE) == MCS_DAYSTATE, "got 0x%08x\n", style);
ok((style & MCS_DAYSTATE) == MCS_DAYSTATE, "got 0x%08lx\n", style);
DestroyWindow(hwnd);
}
......
......@@ -200,7 +200,7 @@ static void check_reg_entries(const char *mrulist, const char**items)
buff[0] = '\0';
ret = RegQueryValueExA(hKey, "MRUList", NULL, &type, (LPBYTE)buff, &size);
ok(!ret && buff[0], "Checking MRU: got %d from RegQueryValueExW\n", ret);
ok(!ret && buff[0], "Checking MRU: got %ld from RegQueryValueExW\n", ret);
if(ret || !buff[0]) return;
ok(strcmp(buff, mrulist) == 0, "Checking MRU: Expected list %s, got %s\n",
......@@ -217,7 +217,7 @@ static void check_reg_entries(const char *mrulist, const char**items)
buff[0] = '\0';
ret = RegQueryValueExA(hKey, name, NULL, &type, (LPBYTE)buff, &size);
ok(!ret && buff[0],
"Checking MRU item %d ('%c'): got %d from RegQueryValueExW\n",
"Checking MRU item %d ('%c'): got %ld from RegQueryValueExW\n",
i, mrulist[i], ret);
if(ret || !buff[0]) return;
ok(!strcmp(buff, items[mrulist[i]-'a']),
......@@ -262,7 +262,7 @@ static void test_MRUListA(void)
SetLastError(0);
hMRU = pCreateMRUListA(&infoA);
ok (!hMRU && !GetLastError(),
"CreateMRUListA(too small) expected NULL,0 got %p,%d\n",
"CreateMRUListA(too small) expected NULL,0 got %p,%ld\n",
hMRU, GetLastError());
/* size too big */
......@@ -276,7 +276,7 @@ static void test_MRUListA(void)
SetLastError(0);
hMRU = pCreateMRUListA(&infoA);
ok (!hMRU && !GetLastError(),
"CreateMRUListA(too big) expected NULL,0 got %p,%d\n",
"CreateMRUListA(too big) expected NULL,0 got %p,%ld\n",
hMRU, GetLastError());
/* NULL hKey */
......@@ -290,7 +290,7 @@ static void test_MRUListA(void)
SetLastError(0);
hMRU = pCreateMRUListA(&infoA);
ok (!hMRU && !GetLastError(),
"CreateMRUListA(NULL key) expected NULL,0 got %p,%d\n",
"CreateMRUListA(NULL key) expected NULL,0 got %p,%ld\n",
hMRU, GetLastError());
/* NULL subkey name */
......@@ -304,7 +304,7 @@ static void test_MRUListA(void)
SetLastError(0);
hMRU = pCreateMRUListA(&infoA);
ok (!hMRU && !GetLastError(),
"CreateMRUListA(NULL name) expected NULL,0 got %p,%d\n",
"CreateMRUListA(NULL name) expected NULL,0 got %p,%ld\n",
hMRU, GetLastError());
/* Create a string MRU */
......@@ -321,7 +321,7 @@ static void test_MRUListA(void)
hMRU = pCreateMRUListA(&infoA);
ok(hMRU && !GetLastError(),
"CreateMRUListA(string) expected non-NULL,0 got %p,%d\n",
"CreateMRUListA(string) expected non-NULL,0 got %p,%ld\n",
hMRU, GetLastError());
if (hMRU)
......@@ -336,35 +336,35 @@ static void test_MRUListA(void)
SetLastError(0);
iRet = pAddMRUStringA(NULL, checks[0]);
ok(iRet == -1 && !GetLastError(),
"AddMRUStringA(NULL list) expected -1,0 got %d,%d\n",
"AddMRUStringA(NULL list) expected -1,0 got %d,%ld\n",
iRet, GetLastError());
/* Add (NULL string) */
SetLastError(0);
iRet = pAddMRUStringA(hMRU, NULL);
todo_wine ok(iRet == 0 && !GetLastError(),
"AddMRUStringA(NULL str) expected 0,0 got %d,%d\n",
"AddMRUStringA(NULL str) expected 0,0 got %d,%ld\n",
iRet, GetLastError());
/* Add 3 strings. Check the registry is correct after each add */
SetLastError(0);
iRet = pAddMRUStringA(hMRU, checks[0]);
ok(iRet == 0 && !GetLastError(),
"AddMRUStringA(1) expected 0,0 got %d,%d\n",
"AddMRUStringA(1) expected 0,0 got %d,%ld\n",
iRet, GetLastError());
check_reg_entries("a", checks);
SetLastError(0);
iRet = pAddMRUStringA(hMRU, checks[1]);
ok(iRet == 1 && !GetLastError(),
"AddMRUStringA(2) expected 1,0 got %d,%d\n",
"AddMRUStringA(2) expected 1,0 got %d,%ld\n",
iRet, GetLastError());
check_reg_entries("ba", checks);
SetLastError(0);
iRet = pAddMRUStringA(hMRU, checks[2]);
ok(iRet == 2 && !GetLastError(),
"AddMRUStringA(2) expected 2,0 got %d,%d\n",
"AddMRUStringA(2) expected 2,0 got %d,%ld\n",
iRet, GetLastError());
check_reg_entries("cba", checks);
......@@ -374,7 +374,7 @@ static void test_MRUListA(void)
SetLastError(0);
iRet = pAddMRUStringA(hMRU, checks[1]);
ok(iRet == 1 && !GetLastError(),
"AddMRUStringA(re-add 1) expected 1,0 got %d,%d\n",
"AddMRUStringA(re-add 1) expected 1,0 got %d,%ld\n",
iRet, GetLastError());
check_reg_entries("bca", checks);
......@@ -382,7 +382,7 @@ static void test_MRUListA(void)
SetLastError(0);
iRet = pAddMRUStringA(hMRU, checks[3]);
ok(iRet == 0 && !GetLastError(),
"AddMRUStringA(add new) expected 0,0 got %d,%d\n",
"AddMRUStringA(add new) expected 0,0 got %d,%ld\n",
iRet, GetLastError());
checks[0] = checks[3];
check_reg_entries("abc", checks);
......
......@@ -114,7 +114,7 @@ static void dump_sequence( struct msg_sequence **seq, int sequence_index,
trace_(file, line)("Failed sequence %s:\n", context );
while (expected->message && actual->message)
{
trace_(file, line)( " %u: expected: %04x - actual: %04x wp %08lx lp %08lx\n",
trace_(file, line)( " %u: expected: %04x - actual: %04x wp %08Ix lp %08Ix\n",
count, expected->message, actual->message, actual->wParam, actual->lParam );
if (expected->message == actual->message)
......@@ -155,7 +155,7 @@ static void dump_sequence( struct msg_sequence **seq, int sequence_index,
while (actual->message)
{
trace_(file, line)( " %u: expected: nothing - actual: %04x wp %08lx lp %08lx\n",
trace_(file, line)( " %u: expected: nothing - actual: %04x wp %08Ix lp %08Ix\n",
count, actual->message, actual->wParam, actual->lParam );
actual++;
count++;
......@@ -190,14 +190,14 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index,
failcount++;
dump++;
ok_(file, line) (FALSE,
"%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n",
"%s: in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n",
context, expected->message, expected->wParam, actual->wParam);
}
}
else
{
ok_(file, line) (expected->wParam == actual->wParam,
"%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n",
"%s: in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n",
context, expected->message, expected->wParam, actual->wParam);
if (expected->wParam != actual->wParam) dump++;
}
......@@ -212,14 +212,14 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index,
failcount++;
dump++;
ok_(file, line) (FALSE,
"%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n",
"%s: in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n",
context, expected->message, expected->lParam, actual->lParam);
}
}
else
{
ok_(file, line) (expected->lParam == actual->lParam,
"%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n",
"%s: in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n",
context, expected->message, expected->lParam, actual->lParam);
if (expected->lParam != actual->lParam) dump++;
}
......@@ -234,14 +234,14 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index,
failcount++;
dump++;
ok_(file, line) (FALSE,
"%s: in msg 0x%04x expecting cd stage 0x%08x got 0x%08x\n",
"%s: in msg 0x%04x expecting cd stage 0x%08lx got 0x%08lx\n",
context, expected->message, expected->stage, actual->stage);
}
}
else
{
ok_(file, line) (expected->stage == actual->stage,
"%s: in msg 0x%04x expecting cd stage 0x%08x got 0x%08x\n",
"%s: in msg 0x%04x expecting cd stage 0x%08lx got 0x%08lx\n",
context, expected->message, expected->stage, actual->stage);
if (expected->stage != actual->stage) dump++;
}
......
......@@ -312,9 +312,9 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
DWORD style = GetWindowLongA(nmpgcs->hdr.hwndFrom, GWL_STYLE);
if (style & PGS_HORZ)
ok(nmpgcs->dwFlag == PGF_CALCWIDTH, "Unexpected flags %#x.\n", nmpgcs->dwFlag);
ok(nmpgcs->dwFlag == PGF_CALCWIDTH, "Unexpected flags %#lx.\n", nmpgcs->dwFlag);
else
ok(nmpgcs->dwFlag == PGF_CALCHEIGHT, "Unexpected flags %#x.\n", nmpgcs->dwFlag);
ok(nmpgcs->dwFlag == PGF_CALCHEIGHT, "Unexpected flags %#lx.\n", nmpgcs->dwFlag);
break;
}
default:
......@@ -449,14 +449,14 @@ static void test_pager(void)
ok_sequence(sequences, PAGER_SEQ_INDEX, set_child_seq, "set child", FALSE);
GetWindowRect( pager, &rect );
ok( rect.right - rect.left == 100 && rect.bottom - rect.top == 100,
"pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top );
"pager resized %ldx%ld\n", rect.right - rect.left, rect.bottom - rect.top );
flush_sequences(sequences, NUM_MSG_SEQUENCES);
SendMessageA(pager, PGM_SETCHILD, 0, (LPARAM)child2_wnd);
ok_sequence(sequences, PAGER_SEQ_INDEX, switch_child_seq, "switch to invisible child", FALSE);
GetWindowRect(pager, &rect);
ok(rect.right - rect.left == 100 && rect.bottom - rect.top == 100,
"pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top);
"pager resized %ldx%ld\n", rect.right - rect.left, rect.bottom - rect.top);
ok(!IsWindowVisible(child2_wnd), "Child window 2 is visible\n");
flush_sequences(sequences, NUM_MSG_SEQUENCES);
......@@ -464,14 +464,14 @@ static void test_pager(void)
ok_sequence(sequences, PAGER_SEQ_INDEX, set_child_seq, "switch to visible child", FALSE);
GetWindowRect(pager, &rect);
ok(rect.right - rect.left == 100 && rect.bottom - rect.top == 100,
"pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top);
"pager resized %ldx%ld\n", rect.right - rect.left, rect.bottom - rect.top);
flush_sequences( sequences, NUM_MSG_SEQUENCES );
SendMessageA( pager, PGM_SETPOS, 0, 10 );
ok_sequence(sequences, PAGER_SEQ_INDEX, set_pos_seq, "set pos", TRUE);
GetWindowRect( pager, &rect );
ok( rect.right - rect.left == 100 && rect.bottom - rect.top == 100,
"pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top );
"pager resized %ldx%ld\n", rect.right - rect.left, rect.bottom - rect.top );
flush_sequences( sequences, NUM_MSG_SEQUENCES );
SendMessageA( pager, PGM_SETPOS, 0, 10 );
......@@ -546,7 +546,7 @@ static void test_wm_notifyformat(void)
INT i;
bret = register_notifyformat_class();
ok(bret, "Register test class failed, error 0x%08x\n", GetLastError());
ok(bret, "Register test class failed, error 0x%08lx\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(formats); i++)
{
......@@ -562,26 +562,26 @@ static void test_wm_notifyformat(void)
/* Test parent */
notify_query_received = FALSE;
ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)parent, NF_REQUERY);
ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret);
ok(ret == notify_format, "Expect %d, got %Id\n", notify_format, ret);
ok(notify_query_received, "Didn't receive notify\n");
/* Send NF_QUERY directly to parent */
notify_query_received = FALSE;
ret = SendMessageW(parent, WM_NOTIFYFORMAT, (WPARAM)pager, NF_QUERY);
ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret);
ok(ret == notify_format, "Expect %d, got %Id\n", notify_format, ret);
ok(notify_query_received, "Didn't receive notify\n");
/* Pager send notifications to its parent regardless of wParam */
notify_query_received = FALSE;
ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)parent_wnd, NF_REQUERY);
ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret);
ok(ret == notify_format, "Expect %d, got %Id\n", notify_format, ret);
ok(notify_query_received, "Didn't receive notify\n");
/* Pager always wants Unicode notifications from children */
ret = SendMessageW(child, WM_NOTIFYFORMAT, (WPARAM)pager, NF_REQUERY);
ok(ret == NFR_UNICODE, "Expect %d, got %ld\n", NFR_UNICODE, ret);
ok(ret == NFR_UNICODE, "Expect %d, got %Id\n", NFR_UNICODE, ret);
ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)child, NF_QUERY);
ok(ret == NFR_UNICODE, "Expect %d, got %ld\n", NFR_UNICODE, ret);
ok(ret == NFR_UNICODE, "Expect %d, got %Id\n", NFR_UNICODE, ret);
DestroyWindow(parent);
}
......@@ -688,9 +688,9 @@ static LRESULT WINAPI test_notify_proc(HWND hwnd, UINT message, WPARAM wParam, L
if (!notify_test_info.unicode) break;
ok(!notify_test_info.received, "Extra notification received\n");
ok(wParam == notify_test_info.id_from, "Expect %ld, got %ld\n", notify_test_info.id_from, wParam);
ok(wParam == notify_test_info.id_from, "Expect %Id, got %Id\n", notify_test_info.id_from, wParam);
ok(hdr->code == notify_test_info.ansi, "Expect 0x%08x, got 0x%08x\n", notify_test_info.ansi, hdr->code);
ok(hdr->idFrom == notify_test_info.id_from, "Expect %ld, got %ld\n", notify_test_info.id_from, wParam);
ok(hdr->idFrom == notify_test_info.id_from, "Expect %Id, got %Id\n", notify_test_info.id_from, wParam);
ok(hdr->hwndFrom == notify_test_info.hwnd_from, "Expect %p, got %p\n", notify_test_info.hwnd_from, hdr->hwndFrom);
if (hdr->code != notify_test_info.ansi)
......@@ -1264,7 +1264,7 @@ static void test_wm_notify(void)
INT i;
bret = register_test_notify_class();
ok(bret, "Register test class failed, error 0x%08x\n", GetLastError());
ok(bret, "Register test class failed, error 0x%08lx\n", GetLastError());
parent = CreateWindowA(class, "parent", WS_OVERLAPPED, 0, 0, 100, 100, 0, 0, GetModuleHandleA(0), 0);
ok(parent != NULL, "CreateWindow failed\n");
......
......@@ -222,22 +222,22 @@ static void test_setcolors(void)
progress = create_progress(PBS_SMOOTH);
clr = SendMessageA(progress, PBM_SETBARCOLOR, 0, 0);
ok(clr == CLR_DEFAULT, "got %x\n", clr);
ok(clr == CLR_DEFAULT, "got %lx\n", clr);
clr = SendMessageA(progress, PBM_SETBARCOLOR, 0, RGB(0, 255, 0));
ok(clr == 0, "got %x\n", clr);
ok(clr == 0, "got %lx\n", clr);
clr = SendMessageA(progress, PBM_SETBARCOLOR, 0, CLR_DEFAULT);
ok(clr == RGB(0, 255, 0), "got %x\n", clr);
ok(clr == RGB(0, 255, 0), "got %lx\n", clr);
clr = SendMessageA(progress, PBM_SETBKCOLOR, 0, 0);
ok(clr == CLR_DEFAULT, "got %x\n", clr);
ok(clr == CLR_DEFAULT, "got %lx\n", clr);
clr = SendMessageA(progress, PBM_SETBKCOLOR, 0, RGB(255, 0, 0));
ok(clr == 0, "got %x\n", clr);
ok(clr == 0, "got %lx\n", clr);
clr = SendMessageA(progress, PBM_SETBKCOLOR, 0, CLR_DEFAULT);
ok(clr == RGB(255, 0, 0), "got %x\n", clr);
ok(clr == RGB(255, 0, 0), "got %lx\n", clr);
DestroyWindow(progress);
}
......
......@@ -930,8 +930,8 @@ static void expect_band_content_(int line, HWND hRebar, UINT uBand, INT fStyle,
rb.cch = MAX_PATH;
ok(SendMessageA(hRebar, RB_GETBANDINFOA, uBand, (LPARAM)&rb), "RB_GETBANDINFOA failed from line %d\n", line);
expect_eq(line, rb.fStyle, fStyle, int, "%x");
expect_eq(line, rb.clrFore, clrFore, COLORREF, "%x");
expect_eq(line, rb.clrBack, clrBack, COLORREF, "%x");
expect_eq(line, rb.clrFore, clrFore, COLORREF, "%lx");
expect_eq(line, rb.clrBack, clrBack, COLORREF, "%lx");
expect_eq(line, strcmp(rb.lpText, lpText), 0, int, "%d");
expect_eq(line, rb.iImage, iImage, int, "%x");
expect_eq(line, rb.hwndChild, hwndChild, HWND, "%p");
......@@ -945,7 +945,7 @@ static void expect_band_content_(int line, HWND hRebar, UINT uBand, INT fStyle,
expect_eq(line, rb.cyMaxChild, cyMaxChild, int, "%x");
expect_eq(line, rb.cyIntegral, cyIntegral, int, "%x");
expect_eq(line, rb.cxIdeal, cxIdeal, int, "%d");
expect_eq(line, rb.lParam, lParam, LPARAM, "%ld");
expect_eq(line, rb.lParam, lParam, LPARAM, "%Id");
ok(rb.cxHeader == cxHeader || rb.cxHeader == cxHeader + 1 || broken(rb.cxHeader == cxHeader_broken),
"expected %d for %d from line %d\n", cxHeader, rb.cxHeader, line);
}
......@@ -1029,9 +1029,9 @@ static void test_colors(void)
/* test default colors */
clr = SendMessageA(hRebar, RB_GETTEXTCOLOR, 0, 0);
compare(clr, CLR_NONE, "%x");
compare(clr, CLR_NONE, "%lx");
clr = SendMessageA(hRebar, RB_GETBKCOLOR, 0, 0);
compare(clr, CLR_NONE, "%x");
compare(clr, CLR_NONE, "%lx");
scheme.dwSize = sizeof(scheme);
scheme.clrBtnHighlight = 0;
......@@ -1039,8 +1039,8 @@ static void test_colors(void)
ret = SendMessageA(hRebar, RB_GETCOLORSCHEME, 0, (LPARAM)&scheme);
if (ret)
{
compare(scheme.clrBtnHighlight, CLR_DEFAULT, "%x");
compare(scheme.clrBtnShadow, CLR_DEFAULT, "%x");
compare(scheme.clrBtnHighlight, CLR_DEFAULT, "%lx");
compare(scheme.clrBtnShadow, CLR_DEFAULT, "%lx");
}
else
skip("RB_GETCOLORSCHEME not supported\n");
......@@ -1052,14 +1052,14 @@ static void test_colors(void)
bi.clrFore = bi.clrBack = 0xc0ffe;
ret = SendMessageA(hRebar, RB_GETBANDINFOA, 0, (LPARAM)&bi);
ok(ret, "RB_GETBANDINFOA failed\n");
compare(bi.clrFore, RGB(0, 0, 0), "%x");
compare(bi.clrBack, GetSysColor(COLOR_3DFACE), "%x");
compare(bi.clrFore, RGB(0, 0, 0), "%lx");
compare(bi.clrBack, GetSysColor(COLOR_3DFACE), "%lx");
SendMessageA(hRebar, RB_SETTEXTCOLOR, 0, RGB(255, 0, 0));
bi.clrFore = bi.clrBack = 0xc0ffe;
ret = SendMessageA(hRebar, RB_GETBANDINFOA, 0, (LPARAM)&bi);
ok(ret, "RB_GETBANDINFOA failed\n");
compare(bi.clrFore, RGB(0, 0, 0), "%x");
compare(bi.clrFore, RGB(0, 0, 0), "%lx");
DestroyWindow(hRebar);
}
......
......@@ -283,10 +283,10 @@ static void test_STM_SETIMAGE(void)
for (type = SS_LEFT; type < SS_ETCHEDFRAME; type++)
{
winetest_push_context("%u", type);
winetest_push_context("%lu", type);
hwnd = create_static(type);
ok(hwnd != 0, "failed to create static type %#x\n", type);
ok(hwnd != 0, "failed to create static type %#lx\n", type);
/* set icon */
g_nReceivedColorStatic = 0;
......
......@@ -25,7 +25,12 @@
#define SUBCLASS_NAME "MyStatusBar"
#define expect(expected,got) ok (expected == got,"Expected %d, got %d\n",expected,got)
#define expect(expected,got) expect_(__LINE__, expected, got)
static inline void expect_(unsigned line, DWORD expected, DWORD got)
{
ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got);
}
#define expect_rect(_left,_top,_right,_bottom,got) do { \
RECT exp = {abs(got.left - _left), abs(got.top - _top), \
abs(got.right - _right), abs(got.bottom - _bottom)}; \
......@@ -145,7 +150,7 @@ static int CALLBACK check_height_font_enumproc(ENUMLOGFONTEXA *enumlf, NEWTEXTME
y = tm.tmHeight + (tm.tmInternalLeading ? tm.tmInternalLeading : 2) + 4;
ok( (rcCtrl.bottom == max(y, g_ysize)) || (rcCtrl.bottom == max(y, g_dpisize)),
"got %d (expected %d or %d) for %s #%d\n",
"got %ld (expected %d or %d) for %s #%d\n",
rcCtrl.bottom, max(y, g_ysize), max(y, g_dpisize), facename, sizes[i]);
SelectObject(hdc, hOldFont);
......@@ -370,11 +375,11 @@ static void test_status_control(void)
crColor = SendMessageA(hWndStatus, SB_SETBKCOLOR , 0, RGB(255,0,0));
ok(crColor == CLR_DEFAULT ||
broken(crColor == RGB(0,0,0)), /* win95 */
"Expected 0x%.8x, got 0x%.8x\n", CLR_DEFAULT, crColor);
"Expected 0x%.8lx, got 0x%.8lx\n", CLR_DEFAULT, crColor);
crColor = SendMessageA(hWndStatus, SB_SETBKCOLOR , 0, CLR_DEFAULT);
ok(crColor == RGB(255,0,0) ||
broken(crColor == RGB(0,0,0)), /* win95 */
"Expected 0x%.8x, got 0x%.8x\n", RGB(255,0,0), crColor);
"Expected 0x%.8lx, got 0x%.8lx\n", RGB(255,0,0), crColor);
/* Add an icon to the status bar */
hIcon = LoadIconA(NULL, (LPCSTR)IDI_QUESTION);
......
......@@ -155,7 +155,7 @@ static void ok_sequence(const struct message *expected, const char *context)
"%s: the procnum %d was expected, but got procnum %d instead\n",
context, expected->procnum, actual->procnum);
ok(expected->wParam == actual->wParam,
"%s: in procnum %d expecting wParam 0x%lx got 0x%lx\n",
"%s: in procnum %d expecting wParam 0x%Ix got 0x%Ix\n",
context, expected->procnum, expected->wParam, actual->wParam);
expected++;
actual++;
......
......@@ -184,7 +184,7 @@ static void test_create_syslink(void)
/* Create an invisible SysLink control */
flush_sequences(sequences, NUM_MSG_SEQUENCE);
hWndSysLink = create_syslink(WS_CHILD | WS_TABSTOP, hWndParent);
ok(hWndSysLink != NULL, "Expected non NULL value (le %u)\n", GetLastError());
ok(hWndSysLink != NULL, "Expected non NULL value (le %lu)\n", GetLastError());
flush_events();
ok_sequence(sequences, SYSLINK_SEQ_INDEX, empty_wnd_seq, "create SysLink", FALSE);
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_create_syslink_wnd_seq, "create SysLink (parent)", TRUE);
......@@ -210,7 +210,7 @@ static void test_LM_GETIDEALHEIGHT(void)
ok(hwnd != NULL, "Failed to create SysLink window.\n");
ret = SendMessageA(hwnd, LM_GETIDEALHEIGHT, 0, 0);
ok(ret > 0, "Unexpected ideal height, %d.\n", ret);
ok(ret > 0, "Unexpected ideal height, %ld.\n", ret);
DestroyWindow(hwnd);
}
......@@ -226,13 +226,13 @@ static void test_LM_GETIDEALSIZE(void)
memset(&sz, 0, sizeof(sz));
ret = SendMessageA(hwnd, LM_GETIDEALSIZE, 0, (LPARAM)&sz);
ok(ret > 0, "Unexpected return value, %d.\n", ret);
ok(ret > 0, "Unexpected return value, %ld.\n", ret);
if (sz.cy == 0)
win_skip("LM_GETIDEALSIZE is not supported.\n");
else
{
ok(sz.cx > 5, "Unexpected ideal width, %d.\n", sz.cx);
ok(sz.cy == ret, "Unexpected ideal height, %d.\n", sz.cy);
ok(sz.cx > 5, "Unexpected ideal width, %ld.\n", sz.cx);
ok(sz.cy == ret, "Unexpected ideal height, %ld.\n", sz.cy);
}
DestroyWindow(hwnd);
......
......@@ -37,7 +37,7 @@
#define expect(expected,got) expect_(__LINE__, expected, got)
static inline void expect_(unsigned line, DWORD expected, DWORD got)
{
ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got);
ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got);
}
#define expect_str(expected, got)\
......@@ -56,14 +56,14 @@ static void CheckSize(HWND hwnd, INT width, INT height, const char *msg, int lin
SendMessageA(hwnd, TCM_GETITEMRECT, 0, (LPARAM)&r);
if (width >= 0 && height < 0)
ok_(__FILE__,line) (width == r.right - r.left, "%s: Expected width [%d] got [%d]\n",
ok_(__FILE__,line) (width == r.right - r.left, "%s: Expected width [%d] got [%ld]\n",
msg, width, r.right - r.left);
else if (height >= 0 && width < 0)
ok_(__FILE__,line) (height == r.bottom - r.top, "%s: Expected height [%d] got [%d]\n",
ok_(__FILE__,line) (height == r.bottom - r.top, "%s: Expected height [%d] got [%ld]\n",
msg, height, r.bottom - r.top);
else
ok_(__FILE__,line) ((width == r.right - r.left) && (height == r.bottom - r.top ),
"%s: Expected [%d,%d] got [%d,%d]\n", msg, width, height,
"%s: Expected [%d,%d] got [%ld,%ld]\n", msg, width, height,
r.right - r.left, r.bottom - r.top);
}
......@@ -461,7 +461,7 @@ static void test_tab(INT nMinTabWidth)
dpi = GetDeviceCaps(hdc, LOGPIXELSX);
hOldFont = SelectObject(hdc, (HFONT)SendMessageA(hwTab, WM_GETFONT, 0, 0));
GetTextExtentPoint32A(hdc, "Tab 1", strlen("Tab 1"), &size);
trace("Tab1 text size: size.cx=%d size.cy=%d\n", size.cx, size.cy);
trace("Tab1 text size: size.cx=%ld size.cy=%ld\n", size.cx, size.cy);
SelectObject(hdc, hOldFont);
ReleaseDC(hwTab, hdc);
......@@ -532,7 +532,7 @@ static void test_tab(INT nMinTabWidth)
exp = max(size.cx +TAB_PADDING_X*2, (nMinTabWidth < 0) ? DEFAULT_MIN_TAB_WIDTH : nMinTabWidth);
SendMessageA( hwTab, TCM_GETITEMRECT, 0, (LPARAM)&rTab );
ok( rTab.right - rTab.left == exp || broken(rTab.right - rTab.left == DEFAULT_MIN_TAB_WIDTH),
"no icon, default width: Expected width [%d] got [%d]\n", exp, rTab.right - rTab.left );
"no icon, default width: Expected width [%d] got [%ld]\n", exp, rTab.right - rTab.left );
for (i=0; i<8; i++)
{
......@@ -560,7 +560,7 @@ static void test_tab(INT nMinTabWidth)
exp = (nMinTabWidth < 0) ? DEFAULT_MIN_TAB_WIDTH : nMinTabWidth;
SendMessageA( hwTab, TCM_GETITEMRECT, 0, (LPARAM)&rTab );
ok( rTab.right - rTab.left == exp || broken(rTab.right - rTab.left == DEFAULT_MIN_TAB_WIDTH),
"no icon, default width: Expected width [%d] got [%d]\n", exp, rTab.right - rTab.left );
"no icon, default width: Expected width [%d] got [%ld]\n", exp, rTab.right - rTab.left );
for (i=0; i<8; i++)
{
......@@ -830,14 +830,14 @@ static void test_getset_item(void)
ok(GetParent(hTab) == NULL, "got %p, expected null parent\n", GetParent(hTab));
ret = SendMessageA(hTab, TCM_SETITEMEXTRA, sizeof(LPARAM)-1, 0);
ok(ret == TRUE, "got %d\n", ret);
ok(ret == TRUE, "got %ld\n", ret);
/* set some item data */
tcItem.lParam = ~0;
tcItem.mask = TCIF_PARAM;
ret = SendMessageA(hTab, TCM_INSERTITEMA, 0, (LPARAM)&tcItem);
ok(ret == 0, "got %d\n", ret);
ok(ret == 0, "got %ld\n", ret);
/* all sizeof(LPARAM) returned anyway when using sizeof(LPARAM)-1 size */
memset(&lparam, 0xaa, sizeof(lparam));
......@@ -847,7 +847,7 @@ static void test_getset_item(void)
expect(TRUE, ret);
/* everything higher specified size is preserved */
memset(&lparam, 0xff, sizeof(lparam)-1);
ok(tcItem.lParam == lparam, "Expected 0x%lx, got 0x%lx\n", lparam, tcItem.lParam);
ok(tcItem.lParam == lparam, "Expected 0x%Ix, got 0x%Ix\n", lparam, tcItem.lParam);
DestroyWindow(hTab);
......@@ -862,7 +862,7 @@ static void test_getset_item(void)
tcItem.mask = TCIF_PARAM;
ret = SendMessageA(hTab, TCM_GETITEMA, 5, (LPARAM)&tcItem);
expect(FALSE, ret);
ok(tcItem.lParam == 0, "Expected zero lParam, got %lu\n", tcItem.lParam);
ok(tcItem.lParam == 0, "Expected zero lParam, got %Iu\n", tcItem.lParam);
memset(&tcItem, 0xcc, sizeof(tcItem));
tcItem.mask = TCIF_IMAGE;
......@@ -899,13 +899,13 @@ static void test_getset_item(void)
tcItem.mask = TCIF_PARAM;
ret = SendMessageA(hTab, TCM_GETITEMA, -1, (LPARAM)&tcItem);
expect(FALSE, ret);
ok(tcItem.lParam == 0, "Expected zero lParam, got %lu\n", tcItem.lParam);
ok(tcItem.lParam == 0, "Expected zero lParam, got %Iu\n", tcItem.lParam);
memset(&tcItem, 0xcc, sizeof(tcItem));
tcItem.mask = TCIF_PARAM;
ret = SendMessageA(hTab, TCM_GETITEMA, -2, (LPARAM)&tcItem);
expect(FALSE, ret);
ok(tcItem.lParam == 0, "Expected zero lParam, got %lu\n", tcItem.lParam);
ok(tcItem.lParam == 0, "Expected zero lParam, got %Iu\n", tcItem.lParam);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
......@@ -1227,10 +1227,10 @@ static void test_TCM_SETITEMEXTRA(void)
}
ret = SendMessageA(hTab, TCM_SETITEMEXTRA, -1, 0);
ok(ret == FALSE, "got %d\n", ret);
ok(ret == FALSE, "got %ld\n", ret);
ret = SendMessageA(hTab, TCM_SETITEMEXTRA, 2, 0);
ok(ret == TRUE, "got %d\n", ret);
ok(ret == TRUE, "got %ld\n", ret);
DestroyWindow(hTab);
/* it's not possible to change extra data size for control with tabs */
......@@ -1238,7 +1238,7 @@ static void test_TCM_SETITEMEXTRA(void)
ok(hTab != NULL, "Failed to create tab control\n");
ret = SendMessageA(hTab, TCM_SETITEMEXTRA, 2, 0);
ok(ret == FALSE, "got %d\n", ret);
ok(ret == FALSE, "got %ld\n", ret);
DestroyWindow(hTab);
}
......@@ -1270,7 +1270,7 @@ static void test_TCS_OWNERDRAWFIXED(void)
itemdata = 0;
memset(&itemdata, 0xde, 4);
ok(g_drawitem.itemData == itemdata, "got 0x%lx, expected 0x%lx\n", g_drawitem.itemData, itemdata);
ok(g_drawitem.itemData == itemdata, "got 0x%Ix, expected 0x%Ix\n", g_drawitem.itemData, itemdata);
DestroyWindow(hTab);
......@@ -1301,7 +1301,7 @@ static void test_TCS_OWNERDRAWFIXED(void)
RedrawWindow(hTab, NULL, 0, RDW_UPDATENOW);
memset(&itemdata, 0xde, sizeof(ULONG_PTR));
ok(*(ULONG_PTR*)g_drawitem.itemData == itemdata, "got 0x%lx, expected 0x%lx\n", g_drawitem.itemData, itemdata);
ok(*(ULONG_PTR*)g_drawitem.itemData == itemdata, "got 0x%Ix, expected 0x%Ix\n", g_drawitem.itemData, itemdata);
DestroyWindow(hTab);
......@@ -1334,7 +1334,7 @@ static void test_TCS_OWNERDRAWFIXED(void)
memset(&itemdata, 0xde, 4);
memset(&itemdata2, 0xde, sizeof(LPARAM)-1);
ok(g_drawitem.itemData == itemdata || broken(g_drawitem.itemData == itemdata2) /* win98 */,
"got 0x%lx, expected 0x%lx\n", g_drawitem.itemData, itemdata);
"got 0x%Ix, expected 0x%Ix\n", g_drawitem.itemData, itemdata);
DestroyWindow(hTab);
}
......@@ -1378,7 +1378,7 @@ static void test_create(void)
hTab = CreateWindowA(WC_TABCONTROLA, "TestTab", ptr->style,
10, 10, 300, 100, parent_wnd, NULL, NULL, 0);
style = GetWindowLongA(hTab, GWL_STYLE);
ok(style == ptr->act_style, "expected style 0x%08x, got style 0x%08x\n", ptr->act_style, style);
ok(style == ptr->act_style, "expected style 0x%08lx, got style 0x%08lx\n", ptr->act_style, style);
DestroyWindow(hTab);
ptr++;
......
......@@ -417,7 +417,7 @@ static void run_test_(TASKDIALOGCONFIG *info, int expect_button, int expect_radi
flush_sequences(sequences, NUM_MSG_SEQUENCES);
hr = pTaskDialogIndirect(info, &ret_button, &ret_radio, &ret_verification);
ok_(file, line)(hr == S_OK, "TaskDialogIndirect() failed, got %#x.\n", hr);
ok_(file, line)(hr == S_OK, "TaskDialogIndirect() failed, got %#lx.\n", hr);
ok_sequence_(sequences, TASKDIALOG_SEQ_INDEX, msg_start, context, FALSE, file, line);
ok_(file, line)(ret_button == expect_button,
......@@ -437,7 +437,7 @@ static HRESULT CALLBACK taskdialog_callback_proc(HWND hwnd, UINT notification,
const struct message_info *msg_send;
struct message msg;
ok(test_ref_data == ref_data, "Unexpected ref data %lu.\n", ref_data);
ok(test_ref_data == ref_data, "Unexpected ref data %Iu.\n", ref_data);
init_test_message(notification, (short)wParam, lParam, &msg);
add_message(sequences, TASKDIALOG_SEQ_INDEX, &msg);
......@@ -458,19 +458,19 @@ static void test_invalid_parameters(void)
HRESULT hr;
hr = pTaskDialogIndirect(NULL, NULL, NULL, NULL);
ok(hr == E_INVALIDARG, "Unexpected return value %#x.\n", hr);
ok(hr == E_INVALIDARG, "Unexpected return value %#lx.\n", hr);
info.cbSize = 0;
hr = pTaskDialogIndirect(&info, NULL, NULL, NULL);
ok(hr == E_INVALIDARG, "Unexpected return value %#x.\n", hr);
ok(hr == E_INVALIDARG, "Unexpected return value %#lx.\n", hr);
info.cbSize = sizeof(TASKDIALOGCONFIG) - 1;
hr = pTaskDialogIndirect(&info, NULL, NULL, NULL);
ok(hr == E_INVALIDARG, "Unexpected return value %#x.\n", hr);
ok(hr == E_INVALIDARG, "Unexpected return value %#lx.\n", hr);
info.cbSize = sizeof(TASKDIALOGCONFIG) + 1;
hr = pTaskDialogIndirect(&info, NULL, NULL, NULL);
ok(hr == E_INVALIDARG, "Unexpected return value %#x.\n", hr);
ok(hr == E_INVALIDARG, "Unexpected return value %#lx.\n", hr);
}
static void test_callback(void)
......@@ -729,9 +729,9 @@ static HRESULT CALLBACK taskdialog_callback_proc_progress_bar(HWND hwnd, UINT no
/* TDM_SET_PROGRESS_BAR_RANGE */
ret = SendMessageW(hwnd, TDM_SET_PROGRESS_BAR_RANGE, 0, MAKELPARAM(0, 200));
ok(ret == MAKELONG(0, 100), "Expect range:%x got:%lx\n", MAKELONG(0, 100), ret);
ok(ret == MAKELONG(0, 100), "Expect range:%lx got:%lx\n", MAKELONG(0, 100), ret);
ret = SendMessageW(hwnd, TDM_SET_PROGRESS_BAR_RANGE, 0, MAKELPARAM(0, 200));
ok(ret == MAKELONG(0, 200), "Expect range:%x got:%lx\n", MAKELONG(0, 200), ret);
ok(ret == MAKELONG(0, 200), "Expect range:%lx got:%lx\n", MAKELONG(0, 200), ret);
/* TDM_SET_PROGRESS_BAR_POS */
if (flags & TDF_SHOW_MARQUEE_PROGRESS_BAR)
......
......@@ -28,7 +28,7 @@
#define expect(expected,got) expect_(__LINE__, expected, got)
static inline void expect_(unsigned line, DWORD expected, DWORD got)
{
ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got);
ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got);
}
#define NUM_MSG_SEQUENCE 2
......@@ -722,21 +722,21 @@ static void test_position(void)
r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0);
ok(r == 25, "got %d\n", r);
SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect2);
ok(rect.left == rect2.left, "got %d\n", rect.left);
ok(rect.left == rect2.left, "got %ld\n", rect.left);
/* with repaint */
SendMessageA(hWndTrackbar, TBM_SETPOS, TRUE, 30);
r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0);
ok(r == 30, "got %d\n", r);
SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect2);
ok(rect.left != rect2.left, "got %d, expected %d\n", rect2.left, rect.left);
ok(rect.left != rect2.left, "got %ld, expected %ld\n", rect2.left, rect.left);
/* now move it with keys */
SendMessageA(hWndTrackbar, WM_KEYDOWN, VK_END, 0);
r = SendMessageA(hWndTrackbar, TBM_GETPOS, 0, 0);
ok(r == 100, "got %d\n", r);
SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect);
ok(rect.left != rect2.left, "got %d, expected %d\n", rect.left, rect2.left);
ok(rect.left != rect2.left, "got %ld, expected %ld\n", rect.left, rect2.left);
DestroyWindow(hWndTrackbar);
}
......@@ -1114,7 +1114,7 @@ static void test_tic_placement(void)
SendMessageA(hWndTrackbar, TBM_SETTICFREQ, 1, 0);
numtics = SendMessageA(hWndTrackbar, TBM_GETNUMTICS, 0, 0);
ok(numtics == 6, "Expected 6, got %d\n", numtics);
ok(numtics == 6, "Expected 6, got %ld\n", numtics);
flush_sequences(sequences, NUM_MSG_SEQUENCE);
/* test TBM_GETPTICS */
......
......@@ -53,7 +53,7 @@
#define expect(expected,got) expect_(__LINE__, expected, got)
static inline void expect_(unsigned line, DWORD expected, DWORD got)
{
ok_(__FILE__, line)(expected == got, "Expected %d, got %d\n", expected, got);
ok_(__FILE__, line)(expected == got, "Expected %ld, got %ld\n", expected, got);
}
#define NUM_MSG_SEQUENCES 3
......@@ -806,7 +806,7 @@ static void test_updown_create(void)
ok(updown != NULL, "Failed to create updown control\n");
r.right = 0;
GetClientRect(updown, &r);
ok(r.right > 0, "Expected default width, got %d\n", r.right);
ok(r.right > 0, "Expected default width, got %ld\n", r.right);
DestroyWindow(updown);
/* create with really small width */
updown = CreateWindowA (UPDOWN_CLASSA, 0, WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 2, 0,
......@@ -814,7 +814,7 @@ static void test_updown_create(void)
ok(updown != NULL, "Failed to create updown control\n");
r.right = 0;
GetClientRect(updown, &r);
ok(r.right != 2 && r.right > 0, "Expected default width, got %d\n", r.right);
ok(r.right != 2 && r.right > 0, "Expected default width, got %ld\n", r.right);
DestroyWindow(updown);
/* create with width greater than default */
updown = CreateWindowA (UPDOWN_CLASSA, 0, WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 100, 0,
......@@ -822,7 +822,7 @@ static void test_updown_create(void)
ok(updown != NULL, "Failed to create updown control\n");
r.right = 0;
GetClientRect(updown, &r);
ok(r.right < 100 && r.right > 0, "Expected default width, got %d\n", r.right);
ok(r.right < 100 && r.right > 0, "Expected default width, got %ld\n", r.right);
DestroyWindow(updown);
/* create with zero height, UDS_HORZ */
updown = CreateWindowA (UPDOWN_CLASSA, 0, UDS_HORZ | WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 0,
......@@ -830,7 +830,7 @@ static void test_updown_create(void)
ok(updown != NULL, "Failed to create updown control\n");
r.bottom = 0;
GetClientRect(updown, &r);
ok(r.bottom == 0, "Expected zero height, got %d\n", r.bottom);
ok(r.bottom == 0, "Expected zero height, got %ld\n", r.bottom);
DestroyWindow(updown);
/* create with really small height, UDS_HORZ */
updown = CreateWindowA (UPDOWN_CLASSA, 0, UDS_HORZ | WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 2,
......@@ -838,7 +838,7 @@ static void test_updown_create(void)
ok(updown != NULL, "Failed to create updown control\n");
r.bottom = 0;
GetClientRect(updown, &r);
ok(r.bottom == 0, "Expected zero height, got %d\n", r.bottom);
ok(r.bottom == 0, "Expected zero height, got %ld\n", r.bottom);
DestroyWindow(updown);
/* create with height greater than default, UDS_HORZ */
updown = CreateWindowA (UPDOWN_CLASSA, 0, UDS_HORZ | WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 100,
......@@ -846,7 +846,7 @@ static void test_updown_create(void)
ok(updown != NULL, "Failed to create updown control\n");
r.bottom = 0;
GetClientRect(updown, &r);
ok(r.bottom < 100 && r.bottom > 0, "Expected default height, got %d\n", r.bottom);
ok(r.bottom < 100 && r.bottom > 0, "Expected default height, got %ld\n", r.bottom);
DestroyWindow(updown);
}
......@@ -987,9 +987,9 @@ static void test_UDS_SETBUDDY(void)
updown = create_updown_control(UDS_ALIGNRIGHT | UDS_SETBUDDYINT | UDS_ARROWKEYS, g_edit);
ret = SetWindowPos(g_edit, 0, 100, 100, start_width, start_height, SWP_NOACTIVATE | SWP_NOZORDER);
ok(ret, "SetWindowPos failed, error %u.\n", GetLastError());
ok(ret, "SetWindowPos failed, error %lu.\n", GetLastError());
ret = GetWindowRect(g_edit, &rect);
ok(ret, "GetWindowRect failed, error %u.\n", GetLastError());
ok(ret, "GetWindowRect failed, error %lu.\n", GetLastError());
width = rect.right - rect.left;
height = rect.bottom - rect.top;
ok(width == start_width, "Expected width %d, got %d.\n", start_width, width);
......@@ -997,13 +997,13 @@ static void test_UDS_SETBUDDY(void)
SendMessageA(updown, UDM_SETBUDDY, (WPARAM)g_edit, 0);
ret = GetWindowRect(g_edit, &rect);
ok(ret, "GetWindowRect failed, error %u.\n", GetLastError());
ok(ret, "GetWindowRect failed, error %lu.\n", GetLastError());
updown_width = start_width - (rect.right - rect.left);
ok(updown_width > 0, "Expected updown width > 0, got %d.\n", updown_width);
SendMessageA(updown, UDM_SETBUDDY, (WPARAM)g_edit, 0);
ret = GetWindowRect(g_edit, &rect);
ok(ret, "GetWindowRect failed, error %u.\n", GetLastError());
ok(ret, "GetWindowRect failed, error %lu.\n", GetLastError());
width = rect.right - rect.left;
height = rect.bottom - rect.top;
ok(width == start_width - 2 * updown_width, "Expected width %d, got %d.\n",
......
......@@ -107,7 +107,7 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
hmod = GetModuleHandleA("comctl32.dll");
ret = ActivateActCtx(*hCtx, pcookie);
ok(ret, "Failed to activate context, error %d.\n", GetLastError());
ok(ret, "Failed to activate context, error %ld.\n", GetLastError());
if (!ret)
{
......@@ -118,7 +118,7 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
data.cbSize = sizeof(data);
ret = FindActCtxSectionStringA(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION,
"comctl32.dll", &data);
ok(ret, "failed to find comctl32.dll in active context, %u\n", GetLastError());
ok(ret, "failed to find comctl32.dll in active context, %lu\n", GetLastError());
if (ret)
{
FreeLibrary(hmod);
......
......@@ -476,8 +476,8 @@ typedef struct
struct _IMAGELIST;
typedef struct _IMAGELIST *HIMAGELIST;
#define CLR_NONE 0xFFFFFFFF
#define CLR_DEFAULT 0xFF000000
#define CLR_NONE __MSABI_LONG(0xFFFFFFFF)
#define CLR_DEFAULT __MSABI_LONG(0xFF000000)
#define CLR_HILIGHT CLR_DEFAULT
#define ILC_MASK 0x00000001
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment