Commit 120ee4e0 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdi32/tests: Fix DC tests compilation with __WINESRC__ defined.

parent dd579e4c
......@@ -531,19 +531,19 @@ static void test_CreateCompatibleDC(void)
HDC hdc, hNewDC, hdcMetafile, screen_dc;
HBITMAP bitmap;
INT caps;
DEVMODE dm;
DEVMODEA dm;
bitmap = CreateBitmap( 10, 10, 1, 1, NULL );
bRet = EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm);
bRet = EnumDisplaySettingsA(NULL, ENUM_CURRENT_SETTINGS, &dm);
ok(bRet, "EnumDisplaySettingsEx failed\n");
dm.u1.s1.dmScale = 200;
dm.dmFields |= DM_SCALE;
hdc = CreateDC( "DISPLAY", NULL, NULL, &dm );
hdc = CreateDCA( "DISPLAY", NULL, NULL, &dm );
screen_dc = CreateDC( "DISPLAY", NULL, NULL, NULL );
screen_dc = CreateDCA( "DISPLAY", NULL, NULL, NULL );
test_device_caps( hdc, screen_dc, "display dc", 1 );
ResetDC( hdc, &dm );
ResetDCA( hdc, &dm );
test_device_caps( hdc, screen_dc, "display dc", 1 );
DeleteDC( hdc );
......@@ -573,7 +573,7 @@ static void test_CreateCompatibleDC(void)
caps = GetDeviceCaps( hdcMetafile, TECHNOLOGY );
ok( caps == DT_RASDISPLAY, "wrong caps %u\n", caps );
test_device_caps( hdcMetafile, hdc, "enhmetafile dc", 1 );
ResetDC( hdcMetafile, &dm );
ResetDCA( hdcMetafile, &dm );
test_device_caps( hdcMetafile, hdc, "enhmetafile dc", 1 );
DeleteDC( hNewDC );
DeleteEnhMetaFile( CloseEnhMetaFile( hdcMetafile ));
......@@ -586,7 +586,7 @@ static void test_CreateCompatibleDC(void)
caps = GetDeviceCaps( hdcMetafile, TECHNOLOGY );
ok( caps == DT_METAFILE, "wrong caps %u\n", caps );
test_device_caps( hdcMetafile, screen_dc, "metafile dc", 1 );
ResetDC( hdcMetafile, &dm );
ResetDCA( hdcMetafile, &dm );
test_device_caps( hdcMetafile, screen_dc, "metafile dc", 1 );
DeleteMetaFile( CloseMetaFile( hdcMetafile ));
......@@ -673,7 +673,7 @@ static void test_DeleteDC(void)
{
HWND hwnd;
HDC hdc, hdc_test;
WNDCLASSEX cls;
WNDCLASSEXA cls;
int ret;
/* window DC */
......@@ -727,7 +727,7 @@ static void test_DeleteDC(void)
memset(&cls, 0, sizeof(cls));
cls.cbSize = sizeof(cls);
cls.style = CS_CLASSDC;
cls.hInstance = GetModuleHandle(0);
cls.hInstance = GetModuleHandleA(NULL);
cls.lpszClassName = "Wine class DC";
cls.lpfnWndProc = DefWindowProcA;
ret = RegisterClassExA(&cls);
......@@ -766,7 +766,7 @@ static void test_DeleteDC(void)
ret = GetObjectType(hdc_test);
ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret);
ret = UnregisterClassA("Wine class DC", GetModuleHandle(NULL));
ret = UnregisterClassA("Wine class DC", GetModuleHandleA(NULL));
ok(ret, "UnregisterClassA failed\n");
ret = GetObjectType(hdc_test);
......@@ -777,7 +777,7 @@ todo_wine
memset(&cls, 0, sizeof(cls));
cls.cbSize = sizeof(cls);
cls.style = CS_OWNDC;
cls.hInstance = GetModuleHandle(0);
cls.hInstance = GetModuleHandleA(NULL);
cls.lpszClassName = "Wine own DC";
cls.lpfnWndProc = DefWindowProcA;
ret = RegisterClassExA(&cls);
......@@ -811,7 +811,7 @@ todo_wine
DestroyWindow(hwnd);
ret = UnregisterClassA("Wine own DC", GetModuleHandle(NULL));
ret = UnregisterClassA("Wine own DC", GetModuleHandleA(NULL));
ok(ret, "UnregisterClassA failed\n");
}
......@@ -1262,7 +1262,7 @@ static HDC create_printer_dc(int scale, BOOL reset)
dbuf->pDriverPath, pbuf->pPrinterName, pbuf->pPortName,
is_postscript_printer(hdc) ? "" : "NOT " );
if (reset) ResetDC( hdc, pbuf->pDevMode );
if (reset) ResetDCA( hdc, pbuf->pDevMode );
done:
HeapFree( GetProcessHeap(), 0, dbuf );
HeapFree( GetProcessHeap(), 0, pbuf );
......@@ -1346,7 +1346,7 @@ static void test_printer_dc(void)
START_TEST(dc)
{
pSetLayout = (void *)GetProcAddress( GetModuleHandle("gdi32.dll"), "SetLayout");
pSetLayout = (void *)GetProcAddress( GetModuleHandleA("gdi32.dll"), "SetLayout");
test_dc_values();
test_savedc();
test_savedc_2();
......
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