Index: rostests/winetests/gdi32/metafile.c =================================================================== --- rostests/winetests/gdi32/metafile.c (revision 75228) +++ rostests/winetests/gdi32/metafile.c (working copy) @@ -2422,8 +2422,10 @@ HDC hdcDisplay, hdcMetafile; HENHMETAFILE hMetafile; BOOL ret; +#ifdef __REACTOS__ LOGFONTA lf; HFONT hFont; +#endif static const INT dx[4] = { 3, 5, 8, 12 }; /* Win9x doesn't play EMFs on invisible windows */ @@ -2434,6 +2436,7 @@ hdcDisplay = GetDC(hwnd); ok(hdcDisplay != 0, "GetDC error %d\n", GetLastError()); +#ifdef __REACTOS__ /* with default font */ ret = BeginPath(hdcDisplay); ok(ret, "BeginPath error %d\n", GetLastError()); @@ -2446,6 +2449,7 @@ ret = GetPath(hdcDisplay, NULL, NULL, 0); ok(!ret, "expected 0, got %d\n", ret); +#endif hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL); ok(hdcMetafile != 0, "CreateEnhMetaFileA error %d\n", GetLastError()); @@ -2454,13 +2458,15 @@ ok(ret, "BeginPath error %d\n", GetLastError()); ret = ExtTextOutA(hdcMetafile, 11, 22, 0, NULL, "Test", 4, dx); - ok(ret, "ExtTextOut error %d\n", GetLastError()); + todo_wine ok(ret, "ExtTextOut error %d\n", GetLastError()); ret = EndPath(hdcMetafile); ok(ret, "EndPath error %d\n", GetLastError()); +#ifdef __REACTOS__ ret = GetPath(hdcMetafile, NULL, NULL, 0); ok(!ret, "expected 0, got %d\n", ret); +#endif hMetafile = CloseEnhMetaFile(hdcMetafile); ok(hMetafile != 0, "CloseEnhMetaFile error %d\n", GetLastError()); @@ -2477,7 +2483,7 @@ ret = DeleteEnhMetaFile(hMetafile); ok(ret, "DeleteEnhMetaFile error %d\n", GetLastError()); - +#ifdef __REACTOS__ /* with outline font */ memset(&lf, 0, sizeof(lf)); lf.lfCharSet = ANSI_CHARSET; @@ -2536,7 +2542,7 @@ ret = DeleteEnhMetaFile(hMetafile); ok(ret, "DeleteEnhMetaFile error %d\n", GetLastError()); - +#endif // def __REACTOS__ ret = ReleaseDC(hwnd, hdcDisplay); ok(ret, "ReleaseDC error %d\n", GetLastError()); DestroyWindow(hwnd); @@ -2548,16 +2554,16 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1e, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, + 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0xd0, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x04, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x7c, 0x01, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, + 0x80, 0x07, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, + 0xfc, 0x01, 0x00, 0x00, 0x3e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x60, 0xcc, 0x05, 0x00, - 0xe0, 0x93, 0x04, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00, + 0x30, 0xda, 0x04, 0x00, 0x36, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, @@ -2567,9 +2573,16 @@ 0x64, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 + 0x00, 0x04, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x64, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, + 0xff, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00 }; static void translate( POINT *pt, UINT count, const XFORM *xform ) @@ -2721,6 +2734,12 @@ ret = SelectClipRgn(hdc, hrgn); ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret); + BeginPath(hdc); + Rectangle(hdc, rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom); + EndPath(hdc); + ret = SelectClipPath(hdc, RGN_AND); + ok(ret, "SelectClipPath error %d\n", GetLastError()); + SetLastError(0xdeadbeef); hemf = CloseEnhMetaFile(hdc); ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError()); @@ -2950,8 +2969,7 @@ hdc = CreateMetaFileA(NULL); ok(hdc != 0, "CreateMetaFileA error %d\n", GetLastError()); - ret = BeginPath(hdc); - ok(!ret, "BeginPath on metafile DC should fail\n"); + BeginPath(hdc); ret = MoveToEx(hdc, 50, 50, NULL); ok( ret, "MoveToEx error %d.\n", GetLastError()); ret = LineTo(hdc, 50, 150); @@ -3839,8 +3857,7 @@ hdcMetafile = CreateEnhMetaFileA(GetDC(0), NULL, NULL, NULL); ok(hdcMetafile != 0, "CreateEnhMetaFileA error %d\n", GetLastError()); - ret = BeginPath(hdcMetafile); - ok(ret, "BeginPath error %d\n", GetLastError()); + BeginPath(hdcMetafile); ret = MoveToEx(hdcMetafile, 50, 50, NULL); ok( ret, "MoveToEx error %d.\n", GetLastError()); ret = LineTo(hdcMetafile, 50, 150);