[20/23] user32/tests: Fix window tests compilation with __WINESRC__ defined.
Dmitry Timoshkov
dmitry at baikal.ru
Wed Oct 23 00:54:25 CDT 2013
---
dlls/user32/tests/win.c | 570 ++++++++++++++++++++++++------------------------
1 file changed, 285 insertions(+), 285 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 515a57e..45263e9 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -97,7 +97,7 @@ static void flush_events( BOOL remove_messages )
{
if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min_timeout, QS_ALLINPUT ) == WAIT_TIMEOUT) break;
if (remove_messages)
- while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
+ while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg );
diff = time - GetTickCount();
min_timeout = 50;
}
@@ -657,7 +657,7 @@ static DWORD CALLBACK enum_thread( void *arg )
"wrong error %u\n", GetLastError() );
}
- PeekMessage( &msg, 0, 0, 0, PM_NOREMOVE ); /* make sure we have a message queue */
+ PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE ); /* make sure we have a message queue */
count = 0;
ret = EnumThreadWindows( GetCurrentThreadId(), enum_proc, (LPARAM)&count );
@@ -840,7 +840,7 @@ static BOOL RegisterWindowClasses(void)
cls.cbWndExtra = 0;
cls.hInstance = GetModuleHandleA(0);
cls.hIcon = 0;
- cls.hCursor = LoadCursorA(0, IDC_ARROW);
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
cls.lpszMenuName = NULL;
cls.lpszClassName = "MainWindowClass";
@@ -853,7 +853,7 @@ static BOOL RegisterWindowClasses(void)
cls.cbWndExtra = 0;
cls.hInstance = GetModuleHandleA(0);
cls.hIcon = 0;
- cls.hCursor = LoadCursorA(0, IDC_ARROW);
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
cls.lpszMenuName = NULL;
cls.lpszClassName = "ToolWindowClass";
@@ -1116,7 +1116,7 @@ static void test_shell_window(void)
}
shellWindow = GetShellWindow();
- hinst = GetModuleHandle(0);
+ hinst = GetModuleHandleA(NULL);
hUser32 = GetModuleHandleA("user32");
SetShellWindow = (void *)GetProcAddress(hUser32, "SetShellWindow");
@@ -1151,7 +1151,7 @@ static void test_shell_window(void)
CloseHandle(hProcess);
}
- hwnd1 = CreateWindowEx(0, TEXT("#32770"), TEXT("TEST1"), WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 100, 100, 300, 200, 0, 0, hinst, 0);
+ hwnd1 = CreateWindowExA(0, "#32770", "TEST1", WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 100, 100, 300, 200, 0, 0, hinst, 0);
trace("created window 1: %p\n", hwnd1);
ret = SetShellWindow(hwnd1);
@@ -1172,22 +1172,22 @@ static void test_shell_window(void)
/* passes on Win XP, but not on Win98
ok(!ret, "third call to SetShellWindow(hwnd1)\n"); */
- SetWindowLong(hwnd1, GWL_EXSTYLE, GetWindowLong(hwnd1,GWL_EXSTYLE)|WS_EX_TOPMOST);
- ret = (GetWindowLong(hwnd1,GWL_EXSTYLE) & WS_EX_TOPMOST) != 0;
+ SetWindowLongA(hwnd1, GWL_EXSTYLE, GetWindowLongA(hwnd1,GWL_EXSTYLE)|WS_EX_TOPMOST);
+ ret = (GetWindowLongA(hwnd1,GWL_EXSTYLE) & WS_EX_TOPMOST) != 0;
ok(!ret, "SetWindowExStyle(hwnd1, WS_EX_TOPMOST)\n");
ret = DestroyWindow(hwnd1);
ok(ret, "DestroyWindow(hwnd1)\n");
- hwnd2 = CreateWindowEx(WS_EX_TOPMOST, TEXT("#32770"), TEXT("TEST2"), WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 150, 250, 300, 200, 0, 0, hinst, 0);
+ hwnd2 = CreateWindowExA(WS_EX_TOPMOST, "#32770", "TEST2", WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 150, 250, 300, 200, 0, 0, hinst, 0);
trace("created window 2: %p\n", hwnd2);
ret = SetShellWindow(hwnd2);
ok(!ret, "SetShellWindow(hwnd2) with WS_EX_TOPMOST\n");
- hwnd3 = CreateWindowEx(0, TEXT("#32770"), TEXT("TEST3"), WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 200, 400, 300, 200, 0, 0, hinst, 0);
+ hwnd3 = CreateWindowExA(0, "#32770", "TEST3", WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 200, 400, 300, 200, 0, 0, hinst, 0);
trace("created window 3: %p\n", hwnd3);
- hwnd4 = CreateWindowEx(0, TEXT("#32770"), TEXT("TEST4"), WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 250, 500, 300, 200, 0, 0, hinst, 0);
+ hwnd4 = CreateWindowExA(0, "#32770", "TEST4", WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 250, 500, 300, 200, 0, 0, hinst, 0);
trace("created window 4: %p\n", hwnd4);
nextWnd = GetWindow(hwnd4, GW_HWNDNEXT);
@@ -1212,7 +1212,7 @@ static void test_shell_window(void)
shellWindow = GetShellWindow();
ok(shellWindow==hwnd4, "wrong shell window: %p - expected hwnd4\n", shellWindow);
- hwnd5 = CreateWindowEx(0, TEXT("#32770"), TEXT("TEST5"), WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 300, 600, 300, 200, 0, 0, hinst, 0);
+ hwnd5 = CreateWindowExA(0, "#32770", "TEST5", WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 300, 600, 300, 200, 0, 0, hinst, 0);
trace("created window 5: %p\n", hwnd5);
ret = SetWindowPos(hwnd4, hwnd5, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE);
ok(ret, "SetWindowPos(hwnd4, hwnd5)\n");
@@ -1245,7 +1245,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
mdi_cs.szClass = "MDI_child_Class_1";
mdi_cs.szTitle = "MDI child";
- mdi_cs.hOwner = GetModuleHandle(0);
+ mdi_cs.hOwner = GetModuleHandleA(NULL);
mdi_cs.x = CW_USEDEFAULT;
mdi_cs.y = CW_USEDEFAULT;
mdi_cs.cx = CW_USEDEFAULT;
@@ -1308,7 +1308,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
0,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- mdi_client, GetModuleHandle(0),
+ mdi_client, GetModuleHandleA(NULL),
(LPARAM)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
@@ -1320,7 +1320,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
0x7fffffff, /* without WS_POPUP */
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- mdi_client, GetModuleHandle(0),
+ mdi_client, GetModuleHandleA(NULL),
(LPARAM)mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
@@ -1332,7 +1332,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
0xffffffff, /* with WS_POPUP */
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- mdi_client, GetModuleHandle(0),
+ mdi_client, GetModuleHandleA(NULL),
(LPARAM)mdi_lParam_test_message);
if (GetWindowLongA(mdi_client, GWL_STYLE) & MDIS_ALLCHILDSTYLES)
{
@@ -1353,7 +1353,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
0,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- mdi_client, GetModuleHandle(0),
+ mdi_client, GetModuleHandleA(NULL),
(LPARAM)mdi_lParam_test_message);
if (!mdi_child)
{
@@ -1374,7 +1374,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
0,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- mdi_client, 0, GetModuleHandle(0),
+ mdi_client, 0, GetModuleHandleA(NULL),
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
@@ -1386,7 +1386,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
0x7fffffff, /* without WS_POPUP */
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- mdi_client, 0, GetModuleHandle(0),
+ mdi_client, 0, GetModuleHandleA(NULL),
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
@@ -1398,7 +1398,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
0xffffffff, /* with WS_POPUP */
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- mdi_client, 0, GetModuleHandle(0),
+ mdi_client, 0, GetModuleHandleA(NULL),
mdi_lParam_test_message);
if (GetWindowLongA(mdi_client, GWL_STYLE) & MDIS_ALLCHILDSTYLES)
{
@@ -1419,7 +1419,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
0,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- mdi_client, 0, GetModuleHandle(0),
+ mdi_client, 0, GetModuleHandleA(NULL),
mdi_lParam_test_message);
if (!mdi_child)
{
@@ -1443,7 +1443,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
WS_CHILD,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- parent, 0, GetModuleHandle(0),
+ parent, 0, GetModuleHandleA(NULL),
mdi_lParam_test_message);
ok(!mdi_child, "WS_EX_MDICHILD with a not MDIClient parent should fail\n");
}
@@ -1452,7 +1452,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
WS_CHILD, /* without WS_POPUP */
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- mdi_client, 0, GetModuleHandle(0),
+ mdi_client, 0, GetModuleHandleA(NULL),
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
@@ -1463,7 +1463,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
WS_CHILD | WS_POPUP, /* with WS_POPUP */
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- mdi_client, 0, GetModuleHandle(0),
+ mdi_client, 0, GetModuleHandleA(NULL),
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
@@ -1475,7 +1475,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
WS_CHILD | WS_MAXIMIZE,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- mdi_client, 0, GetModuleHandle(0),
+ mdi_client, 0, GetModuleHandleA(NULL),
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
@@ -1487,7 +1487,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
WS_CHILD | WS_MAXIMIZE | WS_CAPTION,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- mdi_client, 0, GetModuleHandle(0),
+ mdi_client, 0, GetModuleHandleA(NULL),
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
@@ -1499,7 +1499,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
WS_CHILD | WS_MAXIMIZE | WS_CAPTION | WS_THICKFRAME,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- mdi_client, 0, GetModuleHandle(0),
+ mdi_client, 0, GetModuleHandleA(NULL),
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
@@ -1543,7 +1543,7 @@ static void test_MDI_child_stack(HWND mdi_client)
child_4, child_3, child_2, child_1);
trace("Activate child next to %p\n", child_3);
- SendMessage(mdi_client, WM_MDINEXT, (WPARAM)child_3, 0);
+ SendMessageA(mdi_client, WM_MDINEXT, (WPARAM)child_3, 0);
stack[0] = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
stack[1] = GetWindow(stack[0], GW_HWNDNEXT);
@@ -1555,7 +1555,7 @@ static void test_MDI_child_stack(HWND mdi_client)
child_2, child_4, child_1, child_3, stack[0], stack[1], stack[2], stack[3]);
trace("Activate child previous to %p\n", child_1);
- SendMessage(mdi_client, WM_MDINEXT, (WPARAM)child_1, 1);
+ SendMessageA(mdi_client, WM_MDINEXT, (WPARAM)child_1, 1);
stack[0] = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0);
stack[1] = GetWindow(stack[0], GW_HWNDNEXT);
@@ -1836,7 +1836,7 @@ static LRESULT WINAPI mdi_main_wnd_procA(HWND hwnd, UINT msg, WPARAM wparam, LPA
WS_CHILD /*| WS_VISIBLE*/,
/* tests depend on a not zero MDIClient size */
0, 0, rc.right, rc.bottom,
- hwnd, 0, GetModuleHandle(0),
+ hwnd, 0, GetModuleHandleA(NULL),
&client_cs);
assert(mdi_client);
test_MDI_create(hwnd, mdi_client, client_cs.idFirstChild);
@@ -1848,7 +1848,7 @@ static LRESULT WINAPI mdi_main_wnd_procA(HWND hwnd, UINT msg, WPARAM wparam, LPA
WS_CHILD | MDIS_ALLCHILDSTYLES /*| WS_VISIBLE*/,
/* tests depend on a not zero MDIClient size */
0, 0, rc.right, rc.bottom,
- hwnd, 0, GetModuleHandle(0),
+ hwnd, 0, GetModuleHandleA(NULL),
&client_cs);
assert(mdi_client);
test_MDI_create(hwnd, mdi_client, client_cs.idFirstChild);
@@ -1859,7 +1859,7 @@ static LRESULT WINAPI mdi_main_wnd_procA(HWND hwnd, UINT msg, WPARAM wparam, LPA
NULL,
WS_CHILD,
0, 0, rc.right, rc.bottom,
- hwnd, 0, GetModuleHandle(0),
+ hwnd, 0, GetModuleHandleA(NULL),
&client_cs);
assert(mdi_client);
test_MDI_child_stack(mdi_client);
@@ -1926,7 +1926,7 @@ static BOOL mdi_RegisterWindowClasses(void)
cls.cbWndExtra = 0;
cls.hInstance = GetModuleHandleA(0);
cls.hIcon = 0;
- cls.hCursor = LoadCursorA(0, IDC_ARROW);
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
cls.lpszMenuName = NULL;
cls.lpszClassName = "MDI_parent_Class";
@@ -1955,7 +1955,7 @@ static void test_mdi(void)
WS_MAXIMIZEBOX /*| WS_VISIBLE*/,
100, 100, CW_USEDEFAULT, CW_USEDEFAULT,
GetDesktopWindow(), 0,
- GetModuleHandle(0), NULL);
+ GetModuleHandleA(NULL), NULL);
assert(mdi_hwndMain);
/*
while(GetMessage(&msg, 0, 0, 0))
@@ -1971,9 +1971,9 @@ static void test_icons(void)
{
WNDCLASSEXA cls;
HWND hwnd;
- HICON icon = LoadIconA(0, IDI_APPLICATION);
- HICON icon2 = LoadIconA(0, IDI_QUESTION);
- HICON small_icon = LoadImageA(0, IDI_APPLICATION, IMAGE_ICON,
+ HICON icon = LoadIconA(0, (LPCSTR)IDI_APPLICATION);
+ HICON icon2 = LoadIconA(0, (LPCSTR)IDI_QUESTION);
+ HICON small_icon = LoadImageA(0, (LPCSTR)IDI_APPLICATION, IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED );
HICON res;
@@ -1983,9 +1983,9 @@ static void test_icons(void)
cls.cbClsExtra = 0;
cls.cbWndExtra = 0;
cls.hInstance = 0;
- cls.hIcon = LoadIconA(0, IDI_HAND);
+ cls.hIcon = LoadIconA(0, (LPCSTR)IDI_HAND);
cls.hIconSm = small_icon;
- cls.hCursor = LoadCursorA(0, IDC_ARROW);
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
cls.lpszMenuName = NULL;
cls.lpszClassName = "IconWindowClass";
@@ -2044,7 +2044,7 @@ static LRESULT WINAPI nccalcsize_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM
else InflateRect( rect, -10, -10 );
return 0;
}
- return DefWindowProc( hwnd, msg, wparam, lparam );
+ return DefWindowProcA( hwnd, msg, wparam, lparam );
}
static void test_SetWindowPos(HWND hwnd, HWND hwnd2)
@@ -2068,7 +2068,7 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2)
GetWindowRect(hwnd, &orig_win_rc);
- old_proc = SetWindowLongPtr( hwnd, GWLP_WNDPROC, (ULONG_PTR)nccalcsize_proc );
+ old_proc = SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (ULONG_PTR)nccalcsize_proc );
ret = SetWindowPos(hwnd, 0, 100, 100, 0, 0, SWP_NOZORDER|SWP_FRAMECHANGED);
ok(ret, "Got %d\n", ret);
GetWindowRect( hwnd, &rect );
@@ -2092,7 +2092,7 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2)
ret = SetWindowPos(hwnd, 0, orig_win_rc.left, orig_win_rc.top,
orig_win_rc.right, orig_win_rc.bottom, 0);
ok(ret, "Got %d\n", ret);
- SetWindowLongPtr( hwnd, GWLP_WNDPROC, old_proc );
+ SetWindowLongPtrA( hwnd, GWLP_WNDPROC, old_proc );
/* Win9x truncates coordinates to 16-bit irrespectively */
if (!is_win9x)
@@ -2112,16 +2112,16 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2)
orig_win_rc.right, orig_win_rc.bottom, 0);
ok(ret, "Got %d\n", ret);
- ok(!(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST), "WS_EX_TOPMOST should not be set\n");
+ ok(!(GetWindowLongA(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST), "WS_EX_TOPMOST should not be set\n");
ret = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE);
ok(ret, "Got %d\n", ret);
- ok(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST, "WS_EX_TOPMOST should be set\n");
+ ok(GetWindowLongA(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST, "WS_EX_TOPMOST should be set\n");
ret = SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE);
ok(ret, "Got %d\n", ret);
- ok(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST, "WS_EX_TOPMOST should be set\n");
+ ok(GetWindowLongA(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST, "WS_EX_TOPMOST should be set\n");
ret = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE);
ok(ret, "Got %d\n", ret);
- ok(!(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST), "WS_EX_TOPMOST should not be set\n");
+ ok(!(GetWindowLongA(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST), "WS_EX_TOPMOST should not be set\n");
hwnd_desktop = GetDesktopWindow();
ok(!!hwnd_desktop, "Failed to get hwnd_desktop window (%d).\n", GetLastError());
@@ -2322,15 +2322,15 @@ static void test_SetMenu(HWND parent)
ret = GetMenu(child);
ok(ret == (HMENU)10, "unexpected menu id %p\n", ret);
- style = GetWindowLong(child, GWL_STYLE);
- SetWindowLong(child, GWL_STYLE, style | WS_POPUP);
+ style = GetWindowLongA(child, GWL_STYLE);
+ SetWindowLongA(child, GWL_STYLE, style | WS_POPUP);
ok(SetMenu(child, hMenu), "SetMenu on a popup child window should not fail\n");
ok(SetMenu(child, 0), "SetMenu on a popup child window should not fail\n");
- SetWindowLong(child, GWL_STYLE, style);
+ SetWindowLongA(child, GWL_STYLE, style);
- SetWindowLong(child, GWL_STYLE, style | WS_OVERLAPPED);
+ SetWindowLongA(child, GWL_STYLE, style | WS_OVERLAPPED);
ok(!SetMenu(child, hMenu), "SetMenu on a overlapped child window should fail\n");
- SetWindowLong(child, GWL_STYLE, style);
+ SetWindowLongA(child, GWL_STYLE, style);
DestroyWindow(child);
DestroyMenu(hMenu);
@@ -2350,7 +2350,7 @@ static void test_window_tree(HWND parent, const DWORD *style, const int *order,
{
if (style[i] & DS_CONTROL)
{
- child[i] = CreateWindowExA(0, MAKEINTATOM(32770), "", style[i] & ~WS_VISIBLE,
+ child[i] = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(32770), "", style[i] & ~WS_VISIBLE,
0,0,0,0, parent, (HMENU)i, 0, NULL);
if (style[i] & WS_VISIBLE)
ShowWindow(child[i], SW_SHOW);
@@ -2428,7 +2428,7 @@ static void check_z_order_debug(HWND hwnd, HWND next, HWND prev, HWND owner,
/* skip foreign windows */
while (test && test != next &&
(GetWindowThreadProcessId(test, NULL) != our_pid ||
- UlongToHandle(GetWindowLongPtr(test, GWLP_HINSTANCE)) != GetModuleHandle(0) ||
+ UlongToHandle(GetWindowLongPtrA(test, GWLP_HINSTANCE)) != GetModuleHandleA(NULL) ||
GetWindow(test, GW_OWNER) == next))
{
/*trace("skipping next %p (%p)\n", test, UlongToHandle(GetWindowLongPtr(test, GWLP_HINSTANCE)));*/
@@ -2440,7 +2440,7 @@ static void check_z_order_debug(HWND hwnd, HWND next, HWND prev, HWND owner,
/* skip foreign windows */
while (test && test != prev &&
(GetWindowThreadProcessId(test, NULL) != our_pid ||
- UlongToHandle(GetWindowLongPtr(test, GWLP_HINSTANCE)) != GetModuleHandle(0) ||
+ UlongToHandle(GetWindowLongPtrA(test, GWLP_HINSTANCE)) != GetModuleHandleA(NULL) ||
GetWindow(test, GW_OWNER) == hwnd))
{
/*trace("skipping prev %p (%p)\n", test, UlongToHandle(GetWindowLongPtr(test, GWLP_HINSTANCE)));*/
@@ -2451,7 +2451,7 @@ static void check_z_order_debug(HWND hwnd, HWND next, HWND prev, HWND owner,
test = GetWindow(hwnd, GW_OWNER);
ok_(file, line)(owner == test, "%p: expected owner %p, got %p\n", hwnd, owner, test);
- ex_style = GetWindowLong(hwnd, GWL_EXSTYLE);
+ ex_style = GetWindowLongA(hwnd, GWL_EXSTYLE);
ok_(file, line)(!(ex_style & WS_EX_TOPMOST) == !topmost, "%p: expected %stopmost\n",
hwnd, topmost ? "" : "NOT ");
}
@@ -2467,10 +2467,10 @@ static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E, DWORD style)
check_z_order(hwnd_D, hwnd_E, 0, 0, FALSE);
check_z_order(hwnd_E, 0, hwnd_D, 0, FALSE);
- hwnd_F = CreateWindowEx(0, "MainWindowClass", "Owner window",
+ hwnd_F = CreateWindowExA(0, "MainWindowClass", "Owner window",
WS_OVERLAPPED | WS_CAPTION,
100, 100, 100, 100,
- 0, 0, GetModuleHandle(0), NULL);
+ 0, 0, GetModuleHandleA(NULL), NULL);
trace("hwnd_F %p\n", hwnd_F);
check_z_order(hwnd_F, hwnd_D, 0, 0, FALSE);
@@ -2479,20 +2479,20 @@ static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E, DWORD style)
check_z_order(hwnd_E, hwnd_F, hwnd_D, 0, FALSE);
check_z_order(hwnd_D, hwnd_E, 0, 0, FALSE);
- hwnd_C = CreateWindowEx(0, "MainWindowClass", NULL,
+ hwnd_C = CreateWindowExA(0, "MainWindowClass", NULL,
style,
100, 100, 100, 100,
- hwnd_F, 0, GetModuleHandle(0), NULL);
+ hwnd_F, 0, GetModuleHandleA(NULL), NULL);
trace("hwnd_C %p\n", hwnd_C);
check_z_order(hwnd_F, 0, hwnd_E, 0, FALSE);
check_z_order(hwnd_E, hwnd_F, hwnd_D, 0, FALSE);
check_z_order(hwnd_D, hwnd_E, hwnd_C, 0, FALSE);
check_z_order(hwnd_C, hwnd_D, 0, hwnd_F, FALSE);
- hwnd_B = CreateWindowEx(WS_EX_TOPMOST, "MainWindowClass", NULL,
+ hwnd_B = CreateWindowExA(WS_EX_TOPMOST, "MainWindowClass", NULL,
style,
100, 100, 100, 100,
- hwnd_F, 0, GetModuleHandle(0), NULL);
+ hwnd_F, 0, GetModuleHandleA(NULL), NULL);
trace("hwnd_B %p\n", hwnd_B);
check_z_order(hwnd_F, 0, hwnd_E, 0, FALSE);
check_z_order(hwnd_E, hwnd_F, hwnd_D, 0, FALSE);
@@ -2500,10 +2500,10 @@ static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E, DWORD style)
check_z_order(hwnd_C, hwnd_D, hwnd_B, hwnd_F, FALSE);
check_z_order(hwnd_B, hwnd_C, 0, hwnd_F, TRUE);
- hwnd_A = CreateWindowEx(WS_EX_TOPMOST, "MainWindowClass", NULL,
+ hwnd_A = CreateWindowExA(WS_EX_TOPMOST, "MainWindowClass", NULL,
style,
100, 100, 100, 100,
- 0, 0, GetModuleHandle(0), NULL);
+ 0, 0, GetModuleHandleA(NULL), NULL);
trace("hwnd_A %p\n", hwnd_A);
check_z_order(hwnd_F, 0, hwnd_E, 0, FALSE);
check_z_order(hwnd_E, hwnd_F, hwnd_D, 0, FALSE);
@@ -2536,10 +2536,10 @@ static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E, DWORD style)
/* make hwnd_C owned by a topmost window */
DestroyWindow( hwnd_C );
- hwnd_C = CreateWindowEx(0, "MainWindowClass", NULL,
+ hwnd_C = CreateWindowExA(0, "MainWindowClass", NULL,
style,
100, 100, 100, 100,
- hwnd_A, 0, GetModuleHandle(0), NULL);
+ hwnd_A, 0, GetModuleHandleA(NULL), NULL);
trace("hwnd_C %p\n", hwnd_C);
check_z_order(hwnd_E, 0, hwnd_D, 0, FALSE);
check_z_order(hwnd_D, hwnd_E, hwnd_F, 0, FALSE);
@@ -2593,7 +2593,7 @@ static LRESULT WINAPI set_focus_on_activate_proc(HWND hwnd, UINT msg, WPARAM wp,
ok(GetFocus() == child, "Focus should be on child %p\n", child);
return 0;
}
- return DefWindowProc(hwnd, msg, wp, lp);
+ return DefWindowProcA(hwnd, msg, wp, lp);
}
static void test_SetFocus(HWND hwnd)
@@ -2607,22 +2607,22 @@ static void test_SetFocus(HWND hwnd)
SetFocus(0);
SetFocus(hwnd);
ok( GetFocus() == hwnd, "Failed to set focus to visible window %p\n", hwnd );
- ok( GetWindowLong(hwnd,GWL_STYLE) & WS_VISIBLE, "Window %p not visible\n", hwnd );
+ ok( GetWindowLongA(hwnd,GWL_STYLE) & WS_VISIBLE, "Window %p not visible\n", hwnd );
ShowWindow(hwnd, SW_HIDE);
SetFocus(0);
SetFocus(hwnd);
ok( GetFocus() == hwnd, "Failed to set focus to invisible window %p\n", hwnd );
- ok( !(GetWindowLong(hwnd,GWL_STYLE) & WS_VISIBLE), "Window %p still visible\n", hwnd );
+ ok( !(GetWindowLongA(hwnd,GWL_STYLE) & WS_VISIBLE), "Window %p still visible\n", hwnd );
child = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 0, 0, hwnd, 0, 0, NULL);
assert(child);
SetFocus(child);
ok( GetFocus() == child, "Failed to set focus to invisible child %p\n", child );
- ok( !(GetWindowLong(child,GWL_STYLE) & WS_VISIBLE), "Child %p is visible\n", child );
+ ok( !(GetWindowLongA(child,GWL_STYLE) & WS_VISIBLE), "Child %p is visible\n", child );
ShowWindow(child, SW_SHOW);
- ok( GetWindowLong(child,GWL_STYLE) & WS_VISIBLE, "Child %p is not visible\n", child );
+ ok( GetWindowLongA(child,GWL_STYLE) & WS_VISIBLE, "Child %p is not visible\n", child );
ok( GetFocus() == child, "Focus no longer on child %p\n", child );
ShowWindow(child, SW_HIDE);
- ok( !(GetWindowLong(child,GWL_STYLE) & WS_VISIBLE), "Child %p is visible\n", child );
+ ok( !(GetWindowLongA(child,GWL_STYLE) & WS_VISIBLE), "Child %p is visible\n", child );
ok( GetFocus() == hwnd, "Focus should be on parent %p, not %p\n", hwnd, GetFocus() );
ShowWindow(child, SW_SHOW);
child2 = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 0, 0, child, 0, 0, NULL);
@@ -2630,7 +2630,7 @@ static void test_SetFocus(HWND hwnd)
ShowWindow(child2, SW_SHOW);
SetFocus(child2);
ShowWindow(child, SW_HIDE);
- ok( !(GetWindowLong(child,GWL_STYLE) & WS_VISIBLE), "Child %p is visible\n", child );
+ ok( !(GetWindowLongA(child,GWL_STYLE) & WS_VISIBLE), "Child %p is visible\n", child );
ok( GetFocus() == child2, "Focus should be on %p, not %p\n", child2, GetFocus() );
ShowWindow(child, SW_SHOW);
SetFocus(child);
@@ -2668,12 +2668,12 @@ todo_wine
ok( GetFocus() != child, "Focus should not be on child %p\n", child );
todo_wine
ok( GetFocus() != hwnd, "Focus should not be on parent %p\n", hwnd );
- old_wnd_proc = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)set_focus_on_activate_proc);
+ old_wnd_proc = (WNDPROC)SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (LONG_PTR)set_focus_on_activate_proc);
ShowWindow(hwnd, SW_RESTORE);
ok( GetActiveWindow() == hwnd, "parent window %p should be active\n", hwnd);
todo_wine
ok( GetFocus() == child, "Focus should be on child %p, not %p\n", child, GetFocus() );
- SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)old_wnd_proc);
+ SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (LONG_PTR)old_wnd_proc);
SetFocus( hwnd );
SetParent( child, GetDesktopWindow());
@@ -2870,9 +2870,9 @@ static void test_SetForegroundWindow(HWND hwnd)
hwnd2 = CreateWindowA("static", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0);
check_wnd_state(hwnd2, hwnd2, hwnd2, 0);
- thread_params.window_created = CreateEvent(NULL, FALSE, FALSE, NULL);
+ thread_params.window_created = CreateEventW(NULL, FALSE, FALSE, NULL);
ok(!!thread_params.window_created, "CreateEvent failed, last error %#x.\n", GetLastError());
- thread_params.test_finished = CreateEvent(NULL, FALSE, FALSE, NULL);
+ thread_params.test_finished = CreateEventW(NULL, FALSE, FALSE, NULL);
ok(!!thread_params.test_finished, "CreateEvent failed, last error %#x.\n", GetLastError());
thread = CreateThread(NULL, 0, create_window_thread, &thread_params, 0, &tid);
ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError());
@@ -2883,7 +2883,7 @@ static void test_SetForegroundWindow(HWND hwnd)
SetForegroundWindow(hwnd2);
check_wnd_state(hwnd2, hwnd2, hwnd2, 0);
- while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg);
+ while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
if (0) check_wnd_state(hwnd2, hwnd2, hwnd2, 0);
todo_wine ok(GetActiveWindow() == hwnd2, "Expected active window %p, got %p.\n", hwnd2, GetActiveWindow());
todo_wine ok(GetFocus() == hwnd2, "Expected focus window %p, got %p.\n", hwnd2, GetFocus());
@@ -2935,7 +2935,7 @@ static LRESULT WINAPI button_hook_proc(HWND button, UINT msg, WPARAM wparam, LPA
/* button wnd proc should release capture on WM_KILLFOCUS if it does
* match internal button state.
*/
- SendMessage(button, WM_KILLFOCUS, 0, 0);
+ SendMessageA(button, WM_KILLFOCUS, 0, 0);
check_wnd_state(button, button, button, 0);
ShowWindow(hwnd, SW_SHOW);
@@ -3001,7 +3001,7 @@ static void test_capture_2(void)
/* button wnd proc should ignore WM_KILLFOCUS if it doesn't match
* internal button state.
*/
- SendMessage(button, WM_KILLFOCUS, 0, 0);
+ SendMessageA(button, WM_KILLFOCUS, 0, 0);
check_wnd_state(button, button, button, button);
hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0, 0, 10, 10, 0, 0, 0, NULL);
@@ -3144,8 +3144,8 @@ static void test_capture_4(void)
wclass.style = CS_HREDRAW | CS_VREDRAW;
wclass.lpfnWndProc = test_capture_4_proc;
wclass.hInstance = hInstance;
- wclass.hIcon = LoadIconA( 0, IDI_APPLICATION );
- wclass.hCursor = LoadCursorA( NULL, IDC_ARROW );
+ wclass.hIcon = LoadIconA( 0, (LPCSTR)IDI_APPLICATION );
+ wclass.hCursor = LoadCursorA( 0, (LPCSTR)IDC_ARROW );
wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 );
wclass.lpszMenuName = 0;
wclass.cbClsExtra = 0;
@@ -3277,7 +3277,7 @@ static BOOL wait_for_message( MSG *msg )
ret = peek_message(msg);
if (ret)
{
- if (msg->message == WM_PAINT) DispatchMessage(msg);
+ if (msg->message == WM_PAINT) DispatchMessageA(msg);
else break;
}
else if (MsgWaitForMultipleObjects( 0, NULL, FALSE, 100, QS_ALLINPUT ) == WAIT_TIMEOUT) break;
@@ -3355,7 +3355,7 @@ static void test_mouse_input(HWND hwnd)
if (msg.message == WM_TIMER || ignore_message(msg.message)) continue;
ok(msg.hwnd == popup && msg.message == WM_MOUSEMOVE,
"hwnd %p message %04x\n", msg.hwnd, msg.message);
- DispatchMessage(&msg);
+ DispatchMessageA(&msg);
}
ret = peek_message(&msg);
ok( !ret, "message %04x available\n", msg.message);
@@ -3570,7 +3570,7 @@ static void test_nccalcscroll(HWND parent)
0, rc1.left, rc1.top, rc1.right, rc1.bottom);
/* same test, but with client edge: not enough width */
- SetWindowLong( hwnd, GWL_EXSTYLE, WS_EX_CLIENTEDGE | GetWindowLong( hwnd, GWL_EXSTYLE));
+ SetWindowLongA( hwnd, GWL_EXSTYLE, WS_EX_CLIENTEDGE | GetWindowLongA( hwnd, GWL_EXSTYLE));
nccalchelper( hwnd, sbwidth, 100, &rc1);
ok( rc1.right - rc1.left == sbwidth - 2 * GetSystemMetrics(SM_CXEDGE),
"Width should be %d size is %d,%d - %d,%d\n",
@@ -3731,14 +3731,14 @@ todo_wine {
static LRESULT WINAPI StyleCheckProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
- LPCREATESTRUCT lpcs;
+ LPCREATESTRUCTA lpcs;
LPSTYLESTRUCT lpss;
switch (msg)
{
case WM_NCCREATE:
case WM_CREATE:
- lpcs = (LPCREATESTRUCT)lparam;
+ lpcs = (LPCREATESTRUCTA)lparam;
lpss = lpcs->lpCreateParams;
if (lpss)
{
@@ -3759,28 +3759,28 @@ static LRESULT WINAPI StyleCheckProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM
}
break;
}
- return DefWindowProc(hwnd, msg, wparam, lparam);
+ return DefWindowProcA(hwnd, msg, wparam, lparam);
}
static ATOM atomStyleCheckClass;
static void register_style_check_class(void)
{
- WNDCLASS wc =
+ WNDCLASSA wc =
{
0,
StyleCheckProc,
0,
0,
- GetModuleHandle(NULL),
+ GetModuleHandleA(NULL),
NULL,
- LoadCursor(NULL, IDC_ARROW),
+ LoadCursorA(0, (LPCSTR)IDC_ARROW),
(HBRUSH)(COLOR_BTNFACE+1),
NULL,
- TEXT("WineStyleCheck"),
+ "WineStyleCheck",
};
-
- atomStyleCheckClass = RegisterClass(&wc);
+
+ atomStyleCheckClass = RegisterClassA(&wc);
assert(atomStyleCheckClass);
}
@@ -3797,25 +3797,25 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle
if (dwStyleIn & WS_CHILD)
{
- hwndParent = CreateWindowEx(0, MAKEINTATOM(atomStyleCheckClass), NULL,
+ hwndParent = CreateWindowExA(0, (LPCSTR)MAKEINTATOM(atomStyleCheckClass), NULL,
WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
}
- hwnd = CreateWindowEx(dwExStyleIn, MAKEINTATOM(atomStyleCheckClass), NULL,
+ hwnd = CreateWindowExA(dwExStyleIn, (LPCSTR)MAKEINTATOM(atomStyleCheckClass), NULL,
dwStyleIn, 0, 0, 0, 0, hwndParent, NULL, NULL, &ss);
assert(hwnd);
flush_events( TRUE );
- dwActualStyle = GetWindowLong(hwnd, GWL_STYLE);
- dwActualExStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
+ dwActualStyle = GetWindowLongA(hwnd, GWL_STYLE);
+ dwActualExStyle = GetWindowLongA(hwnd, GWL_EXSTYLE);
ok(dwActualStyle == dwStyleOut, "expected style %#x, got %#x\n", dwStyleOut, dwActualStyle);
ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#x, got %#x\n", dwExStyleOut, dwActualExStyle);
/* try setting the styles explicitly */
- SetWindowLong( hwnd, GWL_EXSTYLE, dwExStyleIn );
- dwActualStyle = GetWindowLong(hwnd, GWL_STYLE);
- dwActualExStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
+ SetWindowLongA( hwnd, GWL_EXSTYLE, dwExStyleIn );
+ dwActualStyle = GetWindowLongA(hwnd, GWL_STYLE);
+ dwActualExStyle = GetWindowLongA(hwnd, GWL_EXSTYLE);
/* WS_EX_WINDOWEDGE can't always be changed */
if (dwExStyleIn & WS_EX_DLGMODALFRAME)
dwExStyleOut = dwExStyleIn | WS_EX_WINDOWEDGE;
@@ -3826,9 +3826,9 @@ static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyle
ok(dwActualStyle == dwStyleOut, "expected style %#x, got %#x\n", dwStyleOut, dwActualStyle);
ok(dwActualExStyle == dwExStyleOut, "expected ex_style %#x, got %#x\n", dwExStyleOut, dwActualExStyle);
- SetWindowLong( hwnd, GWL_STYLE, dwStyleIn );
- dwActualStyle = GetWindowLong(hwnd, GWL_STYLE);
- dwActualExStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
+ SetWindowLongA( hwnd, GWL_STYLE, dwStyleIn );
+ dwActualStyle = GetWindowLongA(hwnd, GWL_STYLE);
+ dwActualExStyle = GetWindowLongA(hwnd, GWL_EXSTYLE);
/* WS_CLIPSIBLINGS can't be reset on top-level windows */
if ((dwStyleIn & (WS_CHILD|WS_POPUP)) == WS_CHILD) dwStyleOut = dwStyleIn;
else dwStyleOut = dwStyleIn | WS_CLIPSIBLINGS;
@@ -3917,7 +3917,7 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou
HWND hwnd, parent = 0;
if (style_in & WS_CHILD)
- parent = CreateWindowEx(0, "static", NULL, WS_OVERLAPPEDWINDOW,
+ parent = CreateWindowExA(0, "static", NULL, WS_OVERLAPPEDWINDOW,
0, 0, 0, 0, NULL, NULL, NULL, NULL);
dlg_data.dt.style = style_in;
@@ -3932,20 +3932,20 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou
dlg_data.class_atom = 0;
dlg_data.caption[0] = 0;
- hwnd = CreateDialogIndirectParam(GetModuleHandle(0), &dlg_data.dt, parent, empty_dlg_proc, 0);
+ hwnd = CreateDialogIndirectParamA(GetModuleHandleA(NULL), &dlg_data.dt, parent, empty_dlg_proc, 0);
ok(hwnd != 0, "dialog creation failed, style %#x, exstyle %#x\n", style_in, ex_style_in);
flush_events( TRUE );
- style = GetWindowLong(hwnd, GWL_STYLE);
- ex_style = GetWindowLong(hwnd, GWL_EXSTYLE);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
+ ex_style = GetWindowLongA(hwnd, GWL_EXSTYLE);
ok(style == (style_out | DS_3DLOOK), "expected style %#x, got %#x\n", style_out | DS_3DLOOK, style);
ok(ex_style == ex_style_out, "expected ex_style %#x, got %#x\n", ex_style_out, ex_style);
/* try setting the styles explicitly */
- SetWindowLong(hwnd, GWL_EXSTYLE, ex_style_in);
- style = GetWindowLong(hwnd, GWL_STYLE);
- ex_style = GetWindowLong(hwnd, GWL_EXSTYLE);
+ SetWindowLongA(hwnd, GWL_EXSTYLE, ex_style_in);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
+ ex_style = GetWindowLongA(hwnd, GWL_EXSTYLE);
ok(style == (style_out | DS_3DLOOK), "expected style %#x, got %#x\n", style_out|DS_3DLOOK, style);
/* WS_EX_WINDOWEDGE can't always be changed */
if (ex_style_in & WS_EX_DLGMODALFRAME)
@@ -3956,9 +3956,9 @@ static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_ou
ex_style_out = ex_style_in & ~WS_EX_WINDOWEDGE;
ok(ex_style == ex_style_out, "expected ex_style %#x, got %#x\n", ex_style_out, ex_style);
- SetWindowLong(hwnd, GWL_STYLE, style_in);
- style = GetWindowLong(hwnd, GWL_STYLE);
- ex_style = GetWindowLong(hwnd, GWL_EXSTYLE);
+ SetWindowLongA(hwnd, GWL_STYLE, style_in);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
+ ex_style = GetWindowLongA(hwnd, GWL_EXSTYLE);
/* WS_CLIPSIBLINGS can't be reset on top-level windows */
if ((style_in & (WS_CHILD | WS_POPUP)) == WS_CHILD) style_out = style_in;
else style_out = style_in | WS_CLIPSIBLINGS;
@@ -4147,7 +4147,7 @@ static void test_scrollvalidate( HWND parent)
SetRectRgn( clipping, 10, 10, 90, 90);
hdc = GetDC( hwnd1);
/* for a visual touch */
- TextOut( hdc, 0,10, "0123456789", 10);
+ TextOutA( hdc, 0,10, "0123456789", 10);
ScrollDC( hdc, -10, -5, &rc, &cliprc, hrgn, &rcu);
if (winetest_debug > 0) dump_region(hrgn);
/* create a region with what is expected */
@@ -4205,12 +4205,12 @@ static void test_scrollvalidate( HWND parent)
hwnd2 = CreateWindowExA(0, "static", NULL,
WS_CHILD| WS_VISIBLE | WS_BORDER ,
50, 50, 100, 100, hwnd1, 0, 0, NULL);
- SetWindowLong( hwnd1, GWL_STYLE, GetWindowLong( hwnd1, GWL_STYLE) & ~WS_CLIPSIBLINGS);
+ SetWindowLongA( hwnd1, GWL_STYLE, GetWindowLongA( hwnd1, GWL_STYLE) & ~WS_CLIPSIBLINGS);
GetClientRect( hwnd1, &rc);
cliprc=rc;
/* WS_CLIPCHILDREN and SW_SCROLLCHILDREN */
- SetWindowLong( hwnd1, GWL_STYLE, GetWindowLong( hwnd1, GWL_STYLE) | WS_CLIPCHILDREN );
+ SetWindowLongA( hwnd1, GWL_STYLE, GetWindowLongA( hwnd1, GWL_STYLE) | WS_CLIPCHILDREN );
ValidateRect( hwnd1, NULL);
ValidateRect( hwnd2, NULL);
ScrollWindowEx( hwnd1, -10, -10, &rc, &cliprc, hrgn, &rcu,
@@ -4222,7 +4222,7 @@ static void test_scrollvalidate( HWND parent)
ok( EqualRgn( exprgn, hrgn), "wrong update region\n");
/* SW_SCROLLCHILDREN */
- SetWindowLong( hwnd1, GWL_STYLE, GetWindowLong( hwnd1, GWL_STYLE) & ~WS_CLIPCHILDREN );
+ SetWindowLongA( hwnd1, GWL_STYLE, GetWindowLongA( hwnd1, GWL_STYLE) & ~WS_CLIPCHILDREN );
ValidateRect( hwnd1, NULL);
ValidateRect( hwnd2, NULL);
ScrollWindowEx( hwnd1, -10, -10, &rc, &cliprc, hrgn, &rcu, SW_SCROLLCHILDREN | SW_INVALIDATE);
@@ -4231,7 +4231,7 @@ static void test_scrollvalidate( HWND parent)
ok( EqualRgn( exprgn, hrgn), "wrong update region\n");
/* no SW_SCROLLCHILDREN */
- SetWindowLong( hwnd1, GWL_STYLE, GetWindowLong( hwnd1, GWL_STYLE) & ~WS_CLIPCHILDREN );
+ SetWindowLongA( hwnd1, GWL_STYLE, GetWindowLongA( hwnd1, GWL_STYLE) & ~WS_CLIPCHILDREN );
ValidateRect( hwnd1, NULL);
ValidateRect( hwnd2, NULL);
ScrollWindowEx( hwnd1, -10, -10, &rc, &cliprc, hrgn, &rcu, SW_INVALIDATE);
@@ -4240,7 +4240,7 @@ static void test_scrollvalidate( HWND parent)
ok( EqualRgn( exprgn, hrgn), "wrong update region\n");
/* WS_CLIPCHILDREN and no SW_SCROLLCHILDREN */
- SetWindowLong( hwnd1, GWL_STYLE, GetWindowLong( hwnd1, GWL_STYLE) | WS_CLIPCHILDREN );
+ SetWindowLongA( hwnd1, GWL_STYLE, GetWindowLongA( hwnd1, GWL_STYLE) | WS_CLIPCHILDREN );
ValidateRect( hwnd1, NULL);
ValidateRect( hwnd2, NULL);
ScrollWindowEx( hwnd1, -10, -10, &rc, &cliprc, hrgn, &rcu, SW_INVALIDATE);
@@ -4386,7 +4386,7 @@ static void test_params(void)
if (pGetMonitorInfoA)
{
SetLastError(0xdeadbeef);
- rc = GetWindowText(hwndMain2, NULL, 1024);
+ rc = GetWindowTextA(hwndMain2, NULL, 1024);
ok( rc==0, "GetWindowText: rc=%d err=%d\n",rc,GetLastError());
}
else
@@ -4396,7 +4396,7 @@ static void test_params(void)
}
SetLastError(0xdeadbeef);
- hwnd=CreateWindow("LISTBOX", "TestList",
+ hwnd=CreateWindowA("LISTBOX", "TestList",
(LBS_STANDARD & ~LBS_SORT),
0, 0, 100, 100,
NULL, (HMENU)1, NULL, 0);
@@ -4413,7 +4413,7 @@ static void test_AWRwindow(LPCSTR class, LONG style, LONG exStyle, BOOL menu)
{
HWND hwnd = 0;
- hwnd = CreateWindowEx(exStyle, class, class, style,
+ hwnd = CreateWindowExA(exStyle, class, class, style,
110, 100,
225, 200,
0,
@@ -4433,20 +4433,20 @@ static void test_AWRwindow(LPCSTR class, LONG style, LONG exStyle, BOOL menu)
static BOOL AWR_init(void)
{
- WNDCLASS class;
+ WNDCLASSA class;
class.style = CS_HREDRAW | CS_VREDRAW;
class.lpfnWndProc = DefWindowProcA;
class.cbClsExtra = 0;
class.cbWndExtra = 0;
class.hInstance = 0;
- class.hIcon = LoadIcon (0, IDI_APPLICATION);
- class.hCursor = LoadCursor (0, IDC_ARROW);
+ class.hIcon = LoadIconA(0, (LPCSTR)IDI_APPLICATION);
+ class.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
class.hbrBackground = 0;
class.lpszMenuName = 0;
class.lpszClassName = szAWRClass;
-
- if (!RegisterClass (&class)) {
+
+ if (!RegisterClassA(&class)) {
ok(FALSE, "RegisterClass failed\n");
return FALSE;
}
@@ -4455,8 +4455,8 @@ static BOOL AWR_init(void)
if (!hmenu)
return FALSE;
ok(hmenu != 0, "Failed to create menu\n");
- ok(AppendMenu(hmenu, MF_STRING, 1, "Test!"), "Failed to create menu item\n");
-
+ ok(AppendMenuA(hmenu, MF_STRING, 1, "Test!"), "Failed to create menu item\n");
+
return TRUE;
}
@@ -4543,7 +4543,7 @@ static LRESULT WINAPI redraw_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LP
}
return 0;
}
- return DefWindowProc(hwnd, msg, wparam, lparam);
+ return DefWindowProcA(hwnd, msg, wparam, lparam);
}
/* Ensure we exit from RedrawNow regardless of invalidated area */
@@ -4558,7 +4558,7 @@ static void test_redrawnow(void)
cls.cbWndExtra = 0;
cls.hInstance = GetModuleHandleA(0);
cls.hIcon = 0;
- cls.hCursor = LoadCursorA(0, IDC_ARROW);
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
cls.lpszMenuName = NULL;
cls.lpszClassName = "RedrawWindowClass";
@@ -4622,7 +4622,7 @@ static LRESULT WINAPI parentdc_window_procA(HWND hwnd, UINT msg, WPARAM wparam,
EndPaint(hwnd, &ps);
return 0;
}
- return DefWindowProc(hwnd, msg, wparam, lparam);
+ return DefWindowProcA(hwnd, msg, wparam, lparam);
}
static void zero_parentdc_stat(struct parentdc_stat *t)
@@ -4729,7 +4729,7 @@ static void test_csparentdc(void)
clsMain.cbWndExtra = 0;
clsMain.hInstance = GetModuleHandleA(0);
clsMain.hIcon = 0;
- clsMain.hCursor = LoadCursorA(0, IDC_ARROW);
+ clsMain.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
clsMain.hbrBackground = GetStockObject(WHITE_BRUSH);
clsMain.lpszMenuName = NULL;
clsMain.lpszClassName = "ParentDcMainWindowClass";
@@ -4745,7 +4745,7 @@ static void test_csparentdc(void)
cls.cbWndExtra = 0;
cls.hInstance = GetModuleHandleA(0);
cls.hIcon = 0;
- cls.hCursor = LoadCursorA(0, IDC_ARROW);
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
cls.lpszMenuName = NULL;
cls.lpszClassName = "ParentDcWindowClass";
@@ -4950,11 +4950,11 @@ static LRESULT CALLBACK minmax_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM l
MINMAXINFO *minmax;
if (msg != WM_GETMINMAXINFO)
- return DefWindowProc(hwnd, msg, wp, lp);
+ return DefWindowProcA(hwnd, msg, wp, lp);
minmax = (MINMAXINFO *)lp;
- if ((GetWindowLong(hwnd, GWL_STYLE) & WS_CHILD))
+ if ((GetWindowLongA(hwnd, GWL_STYLE) & WS_CHILD))
{
minmax->ptReserved.x = 0;
minmax->ptReserved.y = 0;
@@ -4968,7 +4968,7 @@ static LRESULT CALLBACK minmax_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM l
minmax->ptMinTrackSize.y = 100;
}
else
- DefWindowProc(hwnd, msg, wp, lp);
+ DefWindowProcA(hwnd, msg, wp, lp);
return 1;
}
@@ -4985,7 +4985,7 @@ static LRESULT CALLBACK winsizes_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM
GetWindowRect( hwnd, &rect );
ok( !rect.left && !rect.top && !rect.right && !rect.bottom,
"wrong rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
- return DefWindowProc(hwnd, msg, wp, lp);
+ return DefWindowProcA(hwnd, msg, wp, lp);
}
case WM_NCCREATE:
case WM_CREATE:
@@ -5010,7 +5010,7 @@ static LRESULT CALLBACK winsizes_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM
"wrong rect %d,%d-%d,%d / %d,%d-%d,%d\n",
rect.left, rect.top, rect.right, rect.bottom,
expected_rect.left, expected_rect.top, expected_rect.right, expected_rect.bottom );
- return DefWindowProc(hwnd, msg, wp, lp);
+ return DefWindowProcA(hwnd, msg, wp, lp);
}
case WM_NCCALCSIZE:
{
@@ -5019,16 +5019,16 @@ static LRESULT CALLBACK winsizes_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM
ok( !memcmp( &rect, r, sizeof(rect) ),
"passed rect %d,%d-%d,%d doesn't match window rect %d,%d-%d,%d\n",
r->left, r->top, r->right, r->bottom, rect.left, rect.top, rect.right, rect.bottom );
- return DefWindowProc(hwnd, msg, wp, lp);
+ return DefWindowProcA(hwnd, msg, wp, lp);
}
default:
- return DefWindowProc(hwnd, msg, wp, lp);
+ return DefWindowProcA(hwnd, msg, wp, lp);
}
}
static void test_CreateWindow(void)
{
- WNDCLASS cls;
+ WNDCLASSA cls;
HWND hwnd, parent;
HMENU hmenu;
RECT rc, rc_minmax;
@@ -5041,10 +5041,10 @@ static void test_CreateWindow(void)
ok(res, "GetMenu error %d\n", GetLastError())
#define expect_style(window, style)\
- ok((ULONG)GetWindowLong(window, GWL_STYLE) == (style), "expected style %x != %x\n", (LONG)(style), GetWindowLong(window, GWL_STYLE))
+ ok((ULONG)GetWindowLongA(window, GWL_STYLE) == (style), "expected style %x != %x\n", (LONG)(style), GetWindowLongA(window, GWL_STYLE))
#define expect_ex_style(window, ex_style)\
- ok((ULONG)GetWindowLong(window, GWL_EXSTYLE) == (ex_style), "expected ex_style %x != %x\n", (LONG)(ex_style), GetWindowLong(window, GWL_EXSTYLE))
+ ok((ULONG)GetWindowLongA(window, GWL_EXSTYLE) == (ex_style), "expected ex_style %x != %x\n", (LONG)(ex_style), GetWindowLongA(window, GWL_EXSTYLE))
#define expect_gle_broken_9x(gle)\
ok(GetLastError() == gle ||\
@@ -5062,7 +5062,7 @@ static void test_CreateWindow(void)
/* WS_CHILD */
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD,
+ hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, 1);
@@ -5071,7 +5071,7 @@ static void test_CreateWindow(void)
DestroyWindow(hwnd);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_CAPTION,
+ hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_CAPTION,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, 1);
@@ -5080,7 +5080,7 @@ static void test_CreateWindow(void)
DestroyWindow(hwnd);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD,
+ hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, 1);
@@ -5089,7 +5089,7 @@ static void test_CreateWindow(void)
DestroyWindow(hwnd);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD | WS_CAPTION,
+ hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_CAPTION,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, 1);
@@ -5099,7 +5099,7 @@ static void test_CreateWindow(void)
/* WS_POPUP */
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_POPUP,
+ hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_POPUP,
0, 0, 100, 100, parent, hmenu, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, hmenu);
@@ -5113,7 +5113,7 @@ static void test_CreateWindow(void)
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_POPUP | WS_CAPTION,
+ hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, hmenu, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, hmenu);
@@ -5127,7 +5127,7 @@ static void test_CreateWindow(void)
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(0, "static", NULL, WS_POPUP,
+ hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP,
0, 0, 100, 100, parent, hmenu, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, hmenu);
@@ -5141,7 +5141,7 @@ static void test_CreateWindow(void)
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(0, "static", NULL, WS_POPUP | WS_CAPTION,
+ hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, hmenu, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, hmenu);
@@ -5154,7 +5154,7 @@ static void test_CreateWindow(void)
/* WS_CHILD | WS_POPUP */
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP,
+ hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(!hwnd || broken(hwnd != 0 /* Win9x */), "CreateWindowEx should fail\n");
expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE);
@@ -5164,7 +5164,7 @@ static void test_CreateWindow(void)
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP,
+ hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP,
0, 0, 100, 100, parent, hmenu, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, hmenu);
@@ -5176,7 +5176,7 @@ static void test_CreateWindow(void)
expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION,
+ hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(!hwnd || broken(hwnd != 0 /* Win9x */), "CreateWindowEx should fail\n");
expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE);
@@ -5186,7 +5186,7 @@ static void test_CreateWindow(void)
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION,
+ hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, hmenu, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, hmenu);
@@ -5198,7 +5198,7 @@ static void test_CreateWindow(void)
expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD | WS_POPUP,
+ hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_POPUP,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(!hwnd || broken(hwnd != 0 /* Win9x */), "CreateWindowEx should fail\n");
expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE);
@@ -5208,7 +5208,7 @@ static void test_CreateWindow(void)
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD | WS_POPUP,
+ hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_POPUP,
0, 0, 100, 100, parent, hmenu, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, hmenu);
@@ -5220,7 +5220,7 @@ static void test_CreateWindow(void)
expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION,
+ hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, (HMENU)1, 0, NULL);
ok(!hwnd || broken(hwnd != 0 /* Win9x */), "CreateWindowEx should fail\n");
expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE);
@@ -5230,7 +5230,7 @@ static void test_CreateWindow(void)
hmenu = CreateMenu();
assert(hmenu != 0);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION,
+ hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION,
0, 0, 100, 100, parent, hmenu, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(hwnd, hmenu);
@@ -5246,16 +5246,16 @@ static void test_CreateWindow(void)
cls.lpfnWndProc = minmax_wnd_proc;
cls.cbClsExtra = 0;
cls.cbWndExtra = 0;
- cls.hInstance = GetModuleHandle(0);
+ cls.hInstance = GetModuleHandleA(NULL);
cls.hIcon = 0;
- cls.hCursor = LoadCursorA(0, IDC_ARROW);
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
cls.lpszMenuName = NULL;
cls.lpszClassName = "MinMax_WndClass";
- RegisterClass(&cls);
+ RegisterClassA(&cls);
SetLastError(0xdeadbeef);
- parent = CreateWindowEx(0, "MinMax_WndClass", NULL, WS_CAPTION | WS_SYSMENU | WS_THICKFRAME,
+ parent = CreateWindowExA(0, "MinMax_WndClass", NULL, WS_CAPTION | WS_SYSMENU | WS_THICKFRAME,
0, 0, 100, 100, 0, 0, 0, NULL);
ok(parent != 0, "CreateWindowEx error %d\n", GetLastError());
expect_menu(parent, 0);
@@ -5263,7 +5263,7 @@ static void test_CreateWindow(void)
expect_ex_style(parent, WS_EX_WINDOWEDGE);
memset(&minmax, 0, sizeof(minmax));
- SendMessage(parent, WM_GETMINMAXINFO, 0, (LPARAM)&minmax);
+ SendMessageA(parent, WM_GETMINMAXINFO, 0, (LPARAM)&minmax);
SetRect(&rc_minmax, 0, 0, minmax.ptMaxSize.x, minmax.ptMaxSize.y);
ok(IsRectEmpty(&rc_minmax), "ptMaxSize is not empty\n");
SetRect(&rc_minmax, 0, 0, minmax.ptMaxTrackSize.x, minmax.ptMaxTrackSize.y);
@@ -5278,7 +5278,7 @@ static void test_CreateWindow(void)
trace("creating child with rect (%d,%d-%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom);
SetLastError(0xdeadbeef);
- hwnd = CreateWindowEx(0, "MinMax_WndClass", NULL, WS_CHILD | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME,
+ hwnd = CreateWindowExA(0, "MinMax_WndClass", NULL, WS_CHILD | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME,
rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,
parent, (HMENU)1, 0, NULL);
ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError());
@@ -5287,7 +5287,7 @@ static void test_CreateWindow(void)
expect_ex_style(hwnd, WS_EX_WINDOWEDGE);
memset(&minmax, 0, sizeof(minmax));
- SendMessage(hwnd, WM_GETMINMAXINFO, 0, (LPARAM)&minmax);
+ SendMessageA(hwnd, WM_GETMINMAXINFO, 0, (LPARAM)&minmax);
SetRect(&rc_minmax, 0, 0, minmax.ptMaxTrackSize.x, minmax.ptMaxTrackSize.y);
GetWindowRect(hwnd, &rc);
@@ -5299,7 +5299,7 @@ static void test_CreateWindow(void)
cls.lpfnWndProc = winsizes_wnd_proc;
cls.lpszClassName = "Sizes_WndClass";
- RegisterClass(&cls);
+ RegisterClassA(&cls);
expected_cx = expected_cy = 200000;
SetRect( &expected_rect, 0, 0, 200000, 200000 );
@@ -5335,7 +5335,7 @@ static void test_CreateWindow(void)
/* we need a parent at 0,0 so that child coordinates match */
DestroyWindow(parent);
- parent = CreateWindowEx(0, "MinMax_WndClass", NULL, WS_POPUP, 0, 0, 100, 100, 0, 0, 0, NULL);
+ parent = CreateWindowExA(0, "MinMax_WndClass", NULL, WS_POPUP, 0, 0, 100, 100, 0, 0, 0, NULL);
ok(parent != 0, "CreateWindowEx error %d\n", GetLastError());
expected_cx = 100;
@@ -5382,7 +5382,7 @@ static void test_CreateWindow(void)
ReleaseDC( parent, hdc );
DestroyWindow( parent );
SetLastError( 0xdeadbeef );
- parent = CreateWindowEx(WS_EX_APPWINDOW | WS_EX_LAYOUTRTL, "static", NULL, WS_POPUP,
+ parent = CreateWindowExA(WS_EX_APPWINDOW | WS_EX_LAYOUTRTL, "static", NULL, WS_POPUP,
0, 0, 100, 100, 0, 0, 0, NULL);
ok( parent != 0, "creation failed err %u\n", GetLastError());
expect_ex_style( parent, WS_EX_APPWINDOW | WS_EX_LAYOUTRTL );
@@ -5423,12 +5423,12 @@ static void test_CreateWindow(void)
res = pGetProcessDefaultLayout( &layout );
ok( res, "GetProcessDefaultLayout failed err %u\n", GetLastError ());
ok( layout == LAYOUT_RTL, "GetProcessDefaultLayout wrong layout %x\n", layout );
- hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_POPUP,
+ hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_POPUP,
0, 0, 100, 100, 0, 0, 0, NULL);
ok( hwnd != 0, "creation failed err %u\n", GetLastError());
expect_ex_style( hwnd, WS_EX_APPWINDOW | WS_EX_LAYOUTRTL );
DestroyWindow( hwnd );
- hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_POPUP,
+ hwnd = CreateWindowExA(WS_EX_APPWINDOW, "static", NULL, WS_POPUP,
0, 0, 100, 100, parent, 0, 0, NULL);
ok( hwnd != 0, "creation failed err %u\n", GetLastError());
expect_ex_style( hwnd, WS_EX_APPWINDOW );
@@ -5443,8 +5443,8 @@ static void test_CreateWindow(void)
DestroyWindow(parent);
- UnregisterClass("MinMax_WndClass", GetModuleHandle(0));
- UnregisterClass("Sizes_WndClass", GetModuleHandle(0));
+ UnregisterClassA("MinMax_WndClass", GetModuleHandleA(NULL));
+ UnregisterClassA("Sizes_WndClass", GetModuleHandleA(NULL));
#undef expect_gle_broken_9x
#undef expect_menu
@@ -5468,23 +5468,23 @@ static void test_SetWindowLong(void)
WNDPROC old_window_procW;
SetLastError(0xdeadbeef);
- retval = SetWindowLongPtr(NULL, GWLP_WNDPROC, 0);
+ retval = SetWindowLongPtrA(NULL, GWLP_WNDPROC, 0);
ok(!retval, "SetWindowLongPtr on invalid window handle should have returned 0 instead of 0x%lx\n", retval);
ok(check_error(GetLastError(), ERROR_INVALID_WINDOW_HANDLE),
"SetWindowLongPtr should have set error to ERROR_INVALID_WINDOW_HANDLE instead of %d\n", GetLastError());
SetLastError(0xdeadbeef);
- retval = SetWindowLongPtr(hwndMain, 0xdeadbeef, 0);
+ retval = SetWindowLongPtrA(hwndMain, 0xdeadbeef, 0);
ok(!retval, "SetWindowLongPtr on invalid index should have returned 0 instead of 0x%lx\n", retval);
ok(check_error(GetLastError(), ERROR_INVALID_INDEX),
"SetWindowLongPtr should have set error to ERROR_INVALID_INDEX instead of %d\n", GetLastError());
SetLastError(0xdeadbeef);
- retval = SetWindowLongPtr(hwndMain, GWLP_WNDPROC, 0);
+ retval = SetWindowLongPtrA(hwndMain, GWLP_WNDPROC, 0);
ok((WNDPROC)retval == main_window_procA || broken(!retval), /* win9x */
"SetWindowLongPtr on invalid window proc should have returned address of main_window_procA instead of 0x%lx\n", retval);
ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %d\n", GetLastError());
- retval = GetWindowLongPtr(hwndMain, GWLP_WNDPROC);
+ retval = GetWindowLongPtrA(hwndMain, GWLP_WNDPROC);
ok((WNDPROC)retval == main_window_procA,
"SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%lx\n", retval);
ok(!IsWindowUnicode(hwndMain), "hwndMain shouldn't be Unicode\n");
@@ -5501,7 +5501,7 @@ static void test_SetWindowLong(void)
ok(IsWindowUnicode(hwndMain), "hwndMain should now be Unicode\n");
/* set it back to ANSI */
- SetWindowLongPtr(hwndMain, GWLP_WNDPROC, 0);
+ SetWindowLongPtrA(hwndMain, GWLP_WNDPROC, 0);
}
}
@@ -5514,7 +5514,7 @@ static void test_ShowWindow(void)
SetRect(&rcMain, 120, 120, 210, 210);
- hwnd = CreateWindowEx(0, "MainWindowClass", NULL,
+ hwnd = CreateWindowExA(0, "MainWindowClass", NULL,
WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX |
WS_MAXIMIZEBOX | WS_POPUP,
rcMain.left, rcMain.top,
@@ -5522,7 +5522,7 @@ static void test_ShowWindow(void)
0, 0, 0, NULL);
assert(hwnd);
- style = GetWindowLong(hwnd, GWL_STYLE);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(!(style & WS_VISIBLE), "window should not be visible\n");
ok(!(style & WS_MINIMIZE), "window should not be minimized\n");
@@ -5534,7 +5534,7 @@ static void test_ShowWindow(void)
ret = ShowWindow(hwnd, SW_SHOW);
ok(!ret, "not expected ret: %lu\n", ret);
- style = GetWindowLong(hwnd, GWL_STYLE);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
ok(!(style & WS_MINIMIZE), "window should not be minimized\n");
@@ -5546,7 +5546,7 @@ static void test_ShowWindow(void)
ret = ShowWindow(hwnd, SW_MINIMIZE);
ok(ret, "not expected ret: %lu\n", ret);
- style = GetWindowLong(hwnd, GWL_STYLE);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
ok(style & WS_MINIMIZE, "window should be minimized\n");
@@ -5564,7 +5564,7 @@ static void test_ShowWindow(void)
ShowWindow(hwnd, SW_RESTORE);
ok(ret, "not expected ret: %lu\n", ret);
- style = GetWindowLong(hwnd, GWL_STYLE);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
ok(!(style & WS_MINIMIZE), "window should not be minimized\n");
@@ -5576,12 +5576,12 @@ static void test_ShowWindow(void)
ret = EnableWindow(hwnd, FALSE);
ok(!ret, "not expected ret: %lu\n", ret);
- style = GetWindowLong(hwnd, GWL_STYLE);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_DISABLED, "window should be disabled\n");
- ret = DefWindowProc(hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
+ ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
ok(!ret, "not expected ret: %lu\n", ret);
- style = GetWindowLong(hwnd, GWL_STYLE);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_DISABLED, "window should be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
ok(!(style & WS_MINIMIZE), "window should not be minimized\n");
@@ -5591,9 +5591,9 @@ static void test_ShowWindow(void)
rcMain.left, rcMain.top, rcMain.right, rcMain.bottom,
rc.left, rc.top, rc.right, rc.bottom);
- ret = DefWindowProc(hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0);
+ ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0);
ok(!ret, "not expected ret: %lu\n", ret);
- style = GetWindowLong(hwnd, GWL_STYLE);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_DISABLED, "window should be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
ok(!(style & WS_MINIMIZE), "window should not be minimized\n");
@@ -5605,7 +5605,7 @@ static void test_ShowWindow(void)
ret = ShowWindow(hwnd, SW_MINIMIZE);
ok(ret, "not expected ret: %lu\n", ret);
- style = GetWindowLong(hwnd, GWL_STYLE);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_DISABLED, "window should be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
ok(style & WS_MINIMIZE, "window should be minimized\n");
@@ -5613,9 +5613,9 @@ static void test_ShowWindow(void)
GetWindowRect(hwnd, &rc);
ok(!EqualRect(&rcMain, &rc), "rects shouldn't match\n");
- ret = DefWindowProc(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
+ ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
ok(!ret, "not expected ret: %lu\n", ret);
- style = GetWindowLong(hwnd, GWL_STYLE);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_DISABLED, "window should be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
ok(style & WS_MINIMIZE, "window should be minimized\n");
@@ -5625,7 +5625,7 @@ static void test_ShowWindow(void)
ret = ShowWindow(hwnd, SW_RESTORE);
ok(ret, "not expected ret: %lu\n", ret);
- style = GetWindowLong(hwnd, GWL_STYLE);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
ok(style & WS_DISABLED, "window should be disabled\n");
ok(style & WS_VISIBLE, "window should be visible\n");
ok(!(style & WS_MINIMIZE), "window should not be minimized\n");
@@ -5635,49 +5635,49 @@ static void test_ShowWindow(void)
rcMain.left, rcMain.top, rcMain.right, rcMain.bottom,
rc.left, rc.top, rc.right, rc.bottom);
- ret = DefWindowProc(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0);
+ ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0);
ok(!ret, "not expected ret: %lu\n", ret);
ok(IsWindow(hwnd), "window should exist\n");
ret = EnableWindow(hwnd, TRUE);
ok(ret, "not expected ret: %lu\n", ret);
- ret = DefWindowProc(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0);
+ ret = DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0);
ok(!ret, "not expected ret: %lu\n", ret);
ok(!IsWindow(hwnd), "window should not exist\n");
}
static void test_gettext(void)
{
- WNDCLASS cls;
+ WNDCLASSA cls;
LPCSTR clsname = "gettexttest";
HWND hwnd;
LRESULT r;
memset( &cls, 0, sizeof cls );
- cls.lpfnWndProc = DefWindowProc;
+ cls.lpfnWndProc = DefWindowProcA;
cls.lpszClassName = clsname;
- cls.hInstance = GetModuleHandle(NULL);
+ cls.hInstance = GetModuleHandleA(NULL);
- if (!RegisterClass( &cls )) return;
+ if (!RegisterClassA( &cls )) return;
- hwnd = CreateWindow( clsname, "test text", WS_OVERLAPPED, 0, 0, 10, 10, 0, NULL, NULL, NULL);
+ hwnd = CreateWindowA( clsname, "test text", WS_OVERLAPPED, 0, 0, 10, 10, 0, NULL, NULL, NULL);
ok( hwnd != NULL, "window was null\n");
- r = SendMessage( hwnd, WM_GETTEXT, 0x10, 0x1000);
+ r = SendMessageA( hwnd, WM_GETTEXT, 0x10, 0x1000);
ok( r == 0, "settext should return zero\n");
- r = SendMessage( hwnd, WM_GETTEXT, 0x10000, 0);
+ r = SendMessageA( hwnd, WM_GETTEXT, 0x10000, 0);
ok( r == 0, "settext should return zero (%ld)\n", r);
- r = SendMessage( hwnd, WM_GETTEXT, 0xff000000, 0x1000);
+ r = SendMessageA( hwnd, WM_GETTEXT, 0xff000000, 0x1000);
ok( r == 0, "settext should return zero (%ld)\n", r);
- r = SendMessage( hwnd, WM_GETTEXT, 0x1000, 0xff000000);
+ r = SendMessageA( hwnd, WM_GETTEXT, 0x1000, 0xff000000);
ok( r == 0, "settext should return zero (%ld)\n", r);
DestroyWindow(hwnd);
- UnregisterClass( clsname, NULL );
+ UnregisterClassA( clsname, NULL );
}
@@ -5720,14 +5720,14 @@ static void test_GetUpdateRect(void)
parent_wm_paint = FALSE;
grandparent_wm_paint = FALSE;
- while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
+ while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE))
{
if (msg.message == WM_PAINT)
{
if (msg.hwnd == hgrandparent) grandparent_wm_paint = TRUE;
if (msg.hwnd == hparent) parent_wm_paint = TRUE;
}
- DispatchMessage(&msg);
+ DispatchMessageA(&msg);
}
ok(parent_wm_paint, "WM_PAINT should have been received in parent\n");
ok(!grandparent_wm_paint, "WM_PAINT should NOT have been received in grandparent\n");
@@ -5740,7 +5740,7 @@ static void test_GetUpdateRect(void)
cls.cbWndExtra = 0;
cls.hInstance = GetModuleHandleA(0);
cls.hIcon = 0;
- cls.hCursor = LoadCursorA(0, IDC_ARROW);
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
cls.lpszMenuName = NULL;
cls.lpszClassName = classNameA;
@@ -5784,14 +5784,14 @@ static void test_GetUpdateRect(void)
parent_wm_paint = FALSE;
grandparent_wm_paint = FALSE;
- while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
+ while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE))
{
if (msg.message == WM_PAINT)
{
if (msg.hwnd == hgrandparent) grandparent_wm_paint = TRUE;
if (msg.hwnd == hparent) parent_wm_paint = TRUE;
}
- DispatchMessage(&msg);
+ DispatchMessageA(&msg);
}
ok(parent_wm_paint, "WM_PAINT should have been received in parent\n");
ok(!grandparent_wm_paint, "WM_PAINT should NOT have been received in grandparent\n");
@@ -5830,7 +5830,7 @@ static LRESULT CALLBACK TestExposedRegion_WndProc(HWND hwnd, UINT msg, WPARAM wP
return 1;
}
- return DefWindowProc(hwnd, msg, wParam, lParam);
+ return DefWindowProcA(hwnd, msg, wParam, lParam);
}
static void test_Expose(void)
@@ -5859,7 +5859,7 @@ static LRESULT CALLBACK TestNCRedraw_WndProc(HWND hwnd, UINT msg, WPARAM wParam,
switch(msg)
{
case WM_CREATE:
- ncredrawflags = *(UINT *) (((CREATESTRUCT *)lParam)->lpCreateParams);
+ ncredrawflags = *(UINT *) (((CREATESTRUCTA *)lParam)->lpCreateParams);
return 0;
case WM_NCPAINT:
RedrawWindow(hwnd, NULL, NULL, ncredrawflags);
@@ -5869,7 +5869,7 @@ static LRESULT CALLBACK TestNCRedraw_WndProc(HWND hwnd, UINT msg, WPARAM wParam,
EndPaint(hwnd, &ps);
return 0;
}
- return DefWindowProc(hwnd, msg, wParam, lParam);
+ return DefWindowProcA(hwnd, msg, wParam, lParam);
}
static void run_NCRedrawLoop(UINT flags)
@@ -5885,12 +5885,12 @@ static void run_NCRedrawLoop(UINT flags)
ShowWindow(hwnd, SW_SHOW);
UpdateWindow(hwnd);
flush_events( FALSE );
- while(PeekMessage(&msg, hwnd, 0, 0, PM_REMOVE) != 0)
+ while(PeekMessageA(&msg, hwnd, 0, 0, PM_REMOVE) != 0)
{
if (msg.message == WM_PAINT) loopcount++;
if (loopcount >= 100) break;
TranslateMessage(&msg);
- DispatchMessage(&msg);
+ DispatchMessageA(&msg);
MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT);
}
if (flags == (RDW_INVALIDATE | RDW_FRAME))
@@ -5910,8 +5910,8 @@ static void test_NCRedraw(void)
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = 0;
- wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
- wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wndclass.hIcon = LoadIconA(0, (LPCSTR)IDI_APPLICATION);
+ wndclass.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
wndclass.hbrBackground = GetStockObject(WHITE_BRUSH);
wndclass.lpszMenuName = NULL;
@@ -5937,12 +5937,12 @@ static void test_GetWindowModuleFileName(void)
hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0,0,0,0, 0, 0, 0, NULL);
assert(hwnd);
- hinst = (HINSTANCE)GetWindowLongPtr(hwnd, GWLP_HINSTANCE);
- ok(hinst == 0 || broken(hinst == GetModuleHandle(0)), /* win9x */ "expected 0, got %p\n", hinst);
+ hinst = (HINSTANCE)GetWindowLongPtrA(hwnd, GWLP_HINSTANCE);
+ ok(hinst == 0 || broken(hinst == GetModuleHandleA(NULL)), /* win9x */ "expected 0, got %p\n", hinst);
buf1[0] = 0;
SetLastError(0xdeadbeef);
- ret1 = GetModuleFileName(hinst, buf1, sizeof(buf1));
+ ret1 = GetModuleFileNameA(hinst, buf1, sizeof(buf1));
ok(ret1, "GetModuleFileName error %u\n", GetLastError());
buf2[0] = 0;
@@ -5956,10 +5956,10 @@ static void test_GetWindowModuleFileName(void)
ok(ret1 == ret2 || broken(ret2 == ret1 + 1), /* win98 */ "%u != %u\n", ret1, ret2);
ok(!strcmp(buf1, buf2), "%s != %s\n", buf1, buf2);
}
- hinst = GetModuleHandle(0);
+ hinst = GetModuleHandleA(NULL);
SetLastError(0xdeadbeef);
- ret2 = GetModuleFileName(hinst, buf2, ret1 - 2);
+ ret2 = GetModuleFileNameA(hinst, buf2, ret1 - 2);
ok(ret2 == ret1 - 2 || broken(ret2 == ret1 - 3), /* win98 */
"expected %u, got %u\n", ret1 - 2, ret2);
ok(GetLastError() == 0xdeadbeef /* XP */ ||
@@ -5967,7 +5967,7 @@ static void test_GetWindowModuleFileName(void)
"expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError());
SetLastError(0xdeadbeef);
- ret2 = GetModuleFileName(hinst, buf2, 0);
+ ret2 = GetModuleFileNameA(hinst, buf2, 0);
ok(!ret2, "GetModuleFileName should return 0\n");
ok(GetLastError() == 0xdeadbeef /* XP */ ||
GetLastError() == ERROR_INSUFFICIENT_BUFFER, /* win2k3, vista */
@@ -5998,7 +5998,7 @@ static void test_GetWindowModuleFileName(void)
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || broken(GetLastError() == 0xdeadbeef), /* win9x */
"expected ERROR_INVALID_WINDOW_HANDLE, got %u\n", GetLastError());
- hwnd = FindWindow("Shell_TrayWnd", NULL);
+ hwnd = FindWindowA("Shell_TrayWnd", NULL);
ok(IsWindow(hwnd) || broken(!hwnd), "got invalid tray window %p\n", hwnd);
SetLastError(0xdeadbeef);
ret1 = pGetWindowModuleFileNameA(hwnd, buf1, sizeof(buf1));
@@ -6006,7 +6006,7 @@ static void test_GetWindowModuleFileName(void)
if (!ret1) /* inter-process GetWindowModuleFileName works on win9x, so don't test the desktop there */
{
- ret1 = GetModuleFileName(0, buf1, sizeof(buf1));
+ ret1 = GetModuleFileNameA(0, buf1, sizeof(buf1));
hwnd = GetDesktopWindow();
ok(IsWindow(hwnd), "got invalid desktop window %p\n", hwnd);
SetLastError(0xdeadbeef);
@@ -6052,7 +6052,7 @@ static void test_hwnd_message(void)
"parent shouldn't have parent %p\n", pGetAncestor(parent, GA_PARENT) );
trace("parent %p root %p desktop %p\n", parent, root, desktop);
if (!GetClassNameA( parent, buffer, sizeof(buffer) )) buffer[0] = 0;
- ok( !lstrcmpi( buffer, "Message" ), "wrong parent class '%s'\n", buffer );
+ ok( !lstrcmpiA( buffer, "Message" ), "wrong parent class '%s'\n", buffer );
GetWindowRect( parent, &rect );
ok( rect.left == 0 && rect.right == 100 && rect.top == 0 && rect.bottom == 100,
"wrong parent rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
@@ -6120,7 +6120,7 @@ static void test_layered_window(void)
ok( !ret, "GetLayeredWindowAttributes should fail on non-layered window\n" );
ret = pSetLayeredWindowAttributes( hwnd, 0, 0, LWA_ALPHA );
ok( !ret, "SetLayeredWindowAttributes should fail on non-layered window\n" );
- SetWindowLong( hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED );
+ SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED );
ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags );
ok( !ret, "GetLayeredWindowAttributes should fail on layered but not initialized window\n" );
ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE );
@@ -6140,13 +6140,13 @@ static void test_layered_window(void)
ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() );
/* clearing WS_EX_LAYERED resets attributes */
- SetWindowLong( hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED );
+ SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED );
SetLastError( 0xdeadbeef );
ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE );
ok( !ret, "UpdateLayeredWindow should fail on non-layered window\n" );
ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags );
ok( !ret, "GetLayeredWindowAttributes should fail on no longer layered window\n" );
- SetWindowLong( hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED );
+ SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED );
ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags );
ok( !ret, "GetLayeredWindowAttributes should fail on layered but not initialized window\n" );
ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE );
@@ -6225,8 +6225,8 @@ static void test_layered_window(void)
ok( flags == 0, "wrong flags %x\n", flags );
/* default alpha and color key is 0 */
- SetWindowLong( hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED );
- SetWindowLong( hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED );
+ SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED );
+ SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED );
ret = pSetLayeredWindowAttributes( hwnd, 0x222222, 55, 0 );
ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" );
ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags );
@@ -6268,7 +6268,7 @@ static LRESULT CALLBACK fullscreen_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPAR
break;
}
}
- return DefWindowProc(hwnd, msg, wp, lp);
+ return DefWindowProcA(hwnd, msg, wp, lp);
}
static void test_fullscreen(void)
@@ -6279,7 +6279,7 @@ static void test_fullscreen(void)
static const DWORD t_ex_style[] = {
0, WS_EX_APPWINDOW, WS_EX_TOOLWINDOW
};
- WNDCLASS cls;
+ WNDCLASSA cls;
HWND hwnd;
int i, j;
POINT pt;
@@ -6310,13 +6310,13 @@ static void test_fullscreen(void)
cls.lpfnWndProc = fullscreen_wnd_proc;
cls.cbClsExtra = 0;
cls.cbWndExtra = 0;
- cls.hInstance = GetModuleHandle(0);
+ cls.hInstance = GetModuleHandleA(NULL);
cls.hIcon = 0;
- cls.hCursor = LoadCursorA(0, IDC_ARROW);
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
cls.lpszMenuName = NULL;
cls.lpszClassName = "fullscreen_class";
- RegisterClass(&cls);
+ RegisterClassA(&cls);
for (i = 0; i < sizeof(t_style)/sizeof(t_style[0]); i++)
{
@@ -6334,7 +6334,7 @@ static void test_fullscreen(void)
hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style,
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
- GetDesktopWindow(), 0, GetModuleHandle(0), NULL);
+ GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL);
ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style);
GetWindowRect(hwnd, &rc);
trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom);
@@ -6346,7 +6346,7 @@ static void test_fullscreen(void)
style = t_style[i] | WS_MAXIMIZE;
hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style,
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
- GetDesktopWindow(), 0, GetModuleHandle(0), NULL);
+ GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL);
ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style);
GetWindowRect(hwnd, &rc);
trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom);
@@ -6358,7 +6358,7 @@ static void test_fullscreen(void)
style = t_style[i] | WS_MAXIMIZE | WS_CAPTION;
hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style,
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
- GetDesktopWindow(), 0, GetModuleHandle(0), NULL);
+ GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL);
ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style);
GetWindowRect(hwnd, &rc);
trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom);
@@ -6370,7 +6370,7 @@ static void test_fullscreen(void)
style = t_style[i] | WS_CAPTION | WS_MAXIMIZEBOX;
hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style,
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
- GetDesktopWindow(), 0, GetModuleHandle(0), NULL);
+ GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL);
ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style);
GetWindowRect(hwnd, &rc);
trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom);
@@ -6382,7 +6382,7 @@ static void test_fullscreen(void)
style = t_style[i] | WS_MAXIMIZE | WS_CAPTION | WS_MAXIMIZEBOX;
hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style,
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
- GetDesktopWindow(), 0, GetModuleHandle(0), NULL);
+ GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL);
ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style);
GetWindowRect(hwnd, &rc);
trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom);
@@ -6399,7 +6399,7 @@ static void test_fullscreen(void)
style = t_style[i] | WS_MAXIMIZE | WS_MAXIMIZEBOX;
hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style,
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom,
- GetDesktopWindow(), 0, GetModuleHandle(0), NULL);
+ GetDesktopWindow(), 0, GetModuleHandleA(NULL), NULL);
ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style);
GetWindowRect(hwnd, &rc);
trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom);
@@ -6418,7 +6418,7 @@ static void test_fullscreen(void)
}
}
- UnregisterClass("fullscreen_class", GetModuleHandle(0));
+ UnregisterClassA("fullscreen_class", GetModuleHandleA(NULL));
}
static BOOL test_thick_child_got_minmax;
@@ -6529,7 +6529,7 @@ static void test_thick_child_size(HWND parentWindow)
LONG expectedWidth;
LONG expectedHeight;
WNDCLASSA cls;
- LPCTSTR className = "THICK_CHILD_CLASS";
+ static const char className[] = "THICK_CHILD_CLASS";
int i;
LONG adjustedStyle;
static const LONG styles[NUMBER_OF_THICK_CHILD_TESTS] = {
@@ -6594,7 +6594,7 @@ static void test_thick_child_size(HWND parentWindow)
cls.cbWndExtra = 0;
cls.hInstance = GetModuleHandleA(0);
cls.hIcon = 0;
- cls.hCursor = LoadCursorA(0, IDC_ARROW);
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
cls.lpszMenuName = NULL;
cls.lpszClassName = className;
@@ -6610,7 +6610,7 @@ static void test_thick_child_size(HWND parentWindow)
test_thick_child_got_minmax = FALSE;
SetLastError(0xdeadbeef);
- childWindow = CreateWindowEx( exStyles[i], className, "", styles[i], 0, 0, 0, 0, parentWindow, 0, GetModuleHandleA(0), NULL );
+ childWindow = CreateWindowExA( exStyles[i], className, "", styles[i], 0, 0, 0, 0, parentWindow, 0, GetModuleHandleA(0), NULL );
ok(childWindow != NULL, "Failed to create child window, error: %u\n", GetLastError());
ok(test_thick_child_got_minmax, "Got no WM_GETMINMAXINFO\n");
@@ -6647,7 +6647,7 @@ static void test_thick_child_size(HWND parentWindow)
success = DestroyWindow(childWindow);
ok(success,"DestroyWindow call failed, error: %u\n", GetLastError());
}
- ok(UnregisterClass(className, GetModuleHandleA(0)),"UnregisterClass call failed\n");
+ ok(UnregisterClassA(className, GetModuleHandleA(NULL)),"UnregisterClass call failed\n");
}
static void test_handles( HWND full_hwnd )
@@ -6933,15 +6933,15 @@ static void test_GetLastActivePopup(void)
hwndOwner = CreateWindowExA(0, "MainWindowClass", NULL,
WS_VISIBLE | WS_POPUPWINDOW,
100, 100, 200, 200,
- NULL, 0, GetModuleHandle(0), NULL);
+ NULL, 0, GetModuleHandleA(NULL), NULL);
hwndPopup1 = CreateWindowExA(0, "MainWindowClass", NULL,
WS_VISIBLE | WS_POPUPWINDOW,
100, 100, 200, 200,
- hwndOwner, 0, GetModuleHandle(0), NULL);
+ hwndOwner, 0, GetModuleHandleA(NULL), NULL);
hwndPopup2 = CreateWindowExA(0, "MainWindowClass", NULL,
WS_VISIBLE | WS_POPUPWINDOW,
100, 100, 200, 200,
- hwndPopup1, 0, GetModuleHandle(0), NULL);
+ hwndPopup1, 0, GetModuleHandleA(NULL), NULL);
ok( GetLastActivePopup(hwndOwner) == hwndPopup2, "wrong last active popup\n" );
DestroyWindow( hwndPopup2 );
DestroyWindow( hwndPopup1 );
@@ -6951,12 +6951,12 @@ static void test_GetLastActivePopup(void)
static LRESULT WINAPI my_httrasparent_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
{
if (msg == WM_NCHITTEST) return HTTRANSPARENT;
- return DefWindowProc(hwnd, msg, wp, lp);
+ return DefWindowProcA(hwnd, msg, wp, lp);
}
static LRESULT WINAPI my_window_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
{
- return DefWindowProc(hwnd, msg, wp, lp);
+ return DefWindowProcA(hwnd, msg, wp, lp);
}
static void create_window_tree(HWND parent, HWND *window, int size)
@@ -6970,76 +6970,76 @@ static void create_window_tree(HWND parent, HWND *window, int size)
for (i = 0; i < sizeof(style)/sizeof(style[0]); i++)
{
assert(pos < size);
- window[pos] = CreateWindowEx(0, "my_window", NULL, style[i] | WS_CHILD,
+ window[pos] = CreateWindowExA(0, "my_window", NULL, style[i] | WS_CHILD,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
assert(pos < size);
- window[pos] = CreateWindowEx(WS_EX_TRANSPARENT, "my_window", NULL, style[i] | WS_CHILD,
+ window[pos] = CreateWindowExA(WS_EX_TRANSPARENT, "my_window", NULL, style[i] | WS_CHILD,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
assert(pos < size);
- window[pos] = CreateWindowEx(0, "my_httrasparent", NULL, style[i] | WS_CHILD,
+ window[pos] = CreateWindowExA(0, "my_httrasparent", NULL, style[i] | WS_CHILD,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
assert(pos < size);
- window[pos] = CreateWindowEx(WS_EX_TRANSPARENT, "my_httrasparent", NULL, style[i] | WS_CHILD,
+ window[pos] = CreateWindowExA(WS_EX_TRANSPARENT, "my_httrasparent", NULL, style[i] | WS_CHILD,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
assert(pos < size);
- window[pos] = CreateWindowEx(0, "my_button", NULL, style[i] | WS_CHILD | BS_GROUPBOX,
+ window[pos] = CreateWindowExA(0, "my_button", NULL, style[i] | WS_CHILD | BS_GROUPBOX,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
assert(pos < size);
- window[pos] = CreateWindowEx(WS_EX_TRANSPARENT, "my_button", NULL, style[i] | WS_CHILD | BS_GROUPBOX,
+ window[pos] = CreateWindowExA(WS_EX_TRANSPARENT, "my_button", NULL, style[i] | WS_CHILD | BS_GROUPBOX,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
assert(pos < size);
- window[pos] = CreateWindowEx(0, "my_button", NULL, style[i] | WS_CHILD | BS_PUSHBUTTON,
+ window[pos] = CreateWindowExA(0, "my_button", NULL, style[i] | WS_CHILD | BS_PUSHBUTTON,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
assert(pos < size);
- window[pos] = CreateWindowEx(WS_EX_TRANSPARENT, "my_button", NULL, style[i] | WS_CHILD | BS_PUSHBUTTON,
+ window[pos] = CreateWindowExA(WS_EX_TRANSPARENT, "my_button", NULL, style[i] | WS_CHILD | BS_PUSHBUTTON,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
assert(pos < size);
- window[pos] = CreateWindowEx(0, "Button", NULL, style[i] | WS_CHILD | BS_GROUPBOX,
+ window[pos] = CreateWindowExA(0, "Button", NULL, style[i] | WS_CHILD | BS_GROUPBOX,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
assert(pos < size);
- window[pos] = CreateWindowEx(WS_EX_TRANSPARENT, "Button", NULL, style[i] | WS_CHILD | BS_GROUPBOX,
+ window[pos] = CreateWindowExA(WS_EX_TRANSPARENT, "Button", NULL, style[i] | WS_CHILD | BS_GROUPBOX,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
assert(pos < size);
- window[pos] = CreateWindowEx(0, "Button", NULL, style[i] | WS_CHILD | BS_PUSHBUTTON,
+ window[pos] = CreateWindowExA(0, "Button", NULL, style[i] | WS_CHILD | BS_PUSHBUTTON,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
assert(pos < size);
- window[pos] = CreateWindowEx(WS_EX_TRANSPARENT, "Button", NULL, style[i] | WS_CHILD | BS_PUSHBUTTON,
+ window[pos] = CreateWindowExA(WS_EX_TRANSPARENT, "Button", NULL, style[i] | WS_CHILD | BS_PUSHBUTTON,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
assert(pos < size);
- window[pos] = CreateWindowEx(0, "Static", NULL, style[i] | WS_CHILD,
+ window[pos] = CreateWindowExA(0, "Static", NULL, style[i] | WS_CHILD,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
assert(pos < size);
- window[pos] = CreateWindowEx(WS_EX_TRANSPARENT, "Static", NULL, style[i] | WS_CHILD,
+ window[pos] = CreateWindowExA(WS_EX_TRANSPARENT, "Static", NULL, style[i] | WS_CHILD,
0, 0, 100, 100, parent, 0, 0, NULL);
ok(window[pos] != 0, "CreateWindowEx failed\n");
pos++;
@@ -7056,15 +7056,15 @@ static void get_window_attributes(HWND hwnd, struct window_attributes *attrs)
{
DWORD style, ex_style, hittest;
- style = GetWindowLong(hwnd, GWL_STYLE);
- ex_style = GetWindowLong(hwnd, GWL_EXSTYLE);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
+ ex_style = GetWindowLongA(hwnd, GWL_EXSTYLE);
attrs->class_name[0] = 0;
- GetClassName(hwnd, attrs->class_name, sizeof(attrs->class_name));
- hittest = SendMessage(hwnd, WM_NCHITTEST, 0, 0);
+ GetClassNameA(hwnd, attrs->class_name, sizeof(attrs->class_name));
+ hittest = SendMessageA(hwnd, WM_NCHITTEST, 0, 0);
attrs->is_visible = (style & WS_VISIBLE) != 0;
attrs->is_enabled = (style & WS_DISABLED) == 0;
- attrs->is_groupbox = !lstrcmpi(attrs->class_name, "Button") && (style & BS_TYPEMASK) == BS_GROUPBOX;
+ attrs->is_groupbox = !lstrcmpiA(attrs->class_name, "Button") && (style & BS_TYPEMASK) == BS_GROUPBOX;
attrs->is_httransparent = hittest == HTTRANSPARENT;
attrs->is_extransparent = (ex_style & WS_EX_TRANSPARENT) != 0;
}
@@ -7093,26 +7093,26 @@ static void test_child_window_from_point(void)
int found_invisible, found_disabled, found_groupbox, found_httransparent, found_extransparent;
int ret, i;
- ret = GetClassInfo(0, "Button", &cls);
+ ret = GetClassInfoA(0, "Button", &cls);
ok(ret, "GetClassInfo(Button) failed\n");
cls.lpszClassName = "my_button";
- ret = RegisterClass(&cls);
+ ret = RegisterClassA(&cls);
ok(ret, "RegisterClass(my_button) failed\n");
cls.lpszClassName = "my_httrasparent";
cls.lpfnWndProc = my_httrasparent_proc;
- ret = RegisterClass(&cls);
+ ret = RegisterClassA(&cls);
ok(ret, "RegisterClass(my_httrasparent) failed\n");
cls.lpszClassName = "my_window";
cls.lpfnWndProc = my_window_proc;
- ret = RegisterClass(&cls);
+ ret = RegisterClassA(&cls);
ok(ret, "RegisterClass(my_window) failed\n");
- parent = CreateWindowEx(0, "MainWindowClass", NULL,
+ parent = CreateWindowExA(0, "MainWindowClass", NULL,
WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE,
100, 100, 200, 200,
- 0, 0, GetModuleHandle(0), NULL);
+ 0, 0, GetModuleHandleA(NULL), NULL);
ok(parent != 0, "CreateWindowEx failed\n");
trace("parent %p\n", parent);
@@ -7172,11 +7172,11 @@ todo_wine
todo_wine
ok(found_extransparent, "found %d extransparent windows\n", found_extransparent);
- ret = UnregisterClass("my_button", cls.hInstance);
+ ret = UnregisterClassA("my_button", cls.hInstance);
ok(ret, "UnregisterClass(my_button) failed\n");
- ret = UnregisterClass("my_httrasparent", cls.hInstance);
+ ret = UnregisterClassA("my_httrasparent", cls.hInstance);
ok(ret, "UnregisterClass(my_httrasparent) failed\n");
- ret = UnregisterClass("my_window", cls.hInstance);
+ ret = UnregisterClassA("my_window", cls.hInstance);
ok(ret, "UnregisterClass(my_window) failed\n");
}
@@ -7194,11 +7194,11 @@ static void test_map_points(void)
RECT client_rect;
/* Create test windows */
- wnd = CreateWindow("static", "test1", WS_POPUP, pos.x, pos.y, width, height, NULL, NULL, NULL, NULL);
+ wnd = CreateWindowA("static", "test1", WS_POPUP, pos.x, pos.y, width, height, NULL, NULL, NULL, NULL);
ok(wnd != NULL, "Failed %p\n", wnd);
- wnd0 = CreateWindow("static", "test2", WS_POPUP, 0, 0, width, height, NULL, NULL, NULL, NULL);
+ wnd0 = CreateWindowA("static", "test2", WS_POPUP, 0, 0, width, height, NULL, NULL, NULL, NULL);
ok(wnd0 != NULL, "Failed %p\n", wnd);
- dwnd = CreateWindow("static", "test3", 0, 200, 300, 150, 150, NULL, NULL, NULL, NULL);
+ dwnd = CreateWindowA("static", "test3", 0, 200, 300, 150, 150, NULL, NULL, NULL, NULL);
DestroyWindow(dwnd);
ok(dwnd != NULL, "Failed %p\n", dwnd);
@@ -7508,12 +7508,12 @@ START_TEST(win)
WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX |
WS_MAXIMIZEBOX | WS_POPUP,
100, 100, 200, 200,
- 0, 0, GetModuleHandle(0), NULL);
+ 0, 0, GetModuleHandleA(NULL), NULL);
hwndMain2 = CreateWindowExA(/*WS_EX_TOOLWINDOW*/ 0, "MainWindowClass", "Main window 2",
WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX |
WS_MAXIMIZEBOX | WS_POPUP,
100, 100, 200, 200,
- 0, 0, GetModuleHandle(0), NULL);
+ 0, 0, GetModuleHandleA(NULL), NULL);
assert( hwndMain );
assert( hwndMain2 );
--
1.8.4.1
More information about the wine-patches
mailing list