From eb18ce9d4e583d62afa2c3c69194c01fc14d15b4 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Fri, 9 May 2008 16:40:41 +0400 Subject: [PATCH] gdiplus: Added GdipCreateFromHWNDICM (no icm yet) with test. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphics.c | 6 ++++++ dlls/gdiplus/tests/graphics.c | 5 +++++ include/gdiplusflat.h | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index e9de1cda3df..297fefe6e7f 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -92,7 +92,7 @@ @ stdcall GdipCreateFromHDC2(long long ptr) @ stdcall GdipCreateFromHDC(long ptr) @ stdcall GdipCreateFromHWND(long ptr) -@ stub GdipCreateFromHWNDICM +@ stdcall GdipCreateFromHWNDICM(long ptr) @ stdcall GdipCreateHBITMAPFromBitmap(ptr ptr long) @ stub GdipCreateHICONFromBitmap @ stub GdipCreateHalftonePalette diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index a86a015f8b5..db1232414af 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -797,6 +797,12 @@ GpStatus WINGDIPAPI GdipCreateFromHWND(HWND hwnd, GpGraphics **graphics) return Ok; } +/* FIXME: no icm handling */ +GpStatus WINGDIPAPI GdipCreateFromHWNDICM(HWND hwnd, GpGraphics **graphics) +{ + return GdipCreateFromHWND(hwnd, graphics); +} + GpStatus WINGDIPAPI GdipCreateMetafileFromEmf(HENHMETAFILE hemf, BOOL delete, GpMetafile **metafile) { diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 77f1597a1df..168eae35523 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -47,6 +47,11 @@ static void test_constructor_destructor(void) stat = GdipDeleteGraphics(graphics); expect(Ok, stat); + stat = GdipCreateFromHWNDICM(NULL, &graphics); + expect(Ok, stat); + stat = GdipDeleteGraphics(graphics); + expect(Ok, stat); + stat = GdipDeleteGraphics(NULL); expect(InvalidParameter, stat); ReleaseDC(0, hdc); diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 8c468886ec0..55ebe916078 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -53,6 +53,7 @@ GpStatus WINGDIPAPI GdipSetPenWidth(GpPen*,REAL); GpStatus WINGDIPAPI GdipCreateFromHDC(HDC,GpGraphics**); GpStatus WINGDIPAPI GdipCreateFromHDC2(HDC,HANDLE,GpGraphics**); GpStatus WINGDIPAPI GdipCreateFromHWND(HWND,GpGraphics**); +GpStatus WINGDIPAPI GdipCreateFromHWNDICM(HWND,GpGraphics**); GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF*,GDIPCONST GpPointF*, ARGB,ARGB,GpWrapMode,GpLineGradient**); GpStatus WINGDIPAPI GdipCreateLineBrushI(GDIPCONST GpPoint*,GDIPCONST GpPoint*, -- 2.11.4.GIT