From bfffb4f4616cb28dbc346ac058be5f630056cb0c Mon Sep 17 00:00:00 2001 From: Stefan Leichter Date: Sun, 23 Dec 2007 10:56:32 +0100 Subject: [PATCH] gdiplus: Partly implement GdipCreateFromHDC2 --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphics.c | 10 ++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 607ac6abae6..796b7cb0a1f 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -89,7 +89,7 @@ @ stub GdipCreateFontFromDC @ stdcall GdipCreateFontFromLogfontA(ptr ptr ptr) @ stdcall GdipCreateFontFromLogfontW(ptr ptr ptr) -@ stub GdipCreateFromHDC2 +@ stdcall GdipCreateFromHDC2(long long ptr) @ stdcall GdipCreateFromHDC(long ptr) @ stdcall GdipCreateFromHWND(long ptr) @ stub GdipCreateFromHWNDICM diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index c69c0e55be0..65e715196a8 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -744,9 +744,19 @@ end: } GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics) +{ + return GdipCreateFromHDC2(hdc, NULL, graphics); +} + +GpStatus WINGDIPAPI GdipCreateFromHDC2(HDC hdc, HANDLE hDevice, GpGraphics **graphics) { GpStatus retval; + if(hDevice != NULL) { + FIXME("Don't know how to hadle parameter hDevice\n"); + return NotImplemented; + } + if(hdc == NULL) return OutOfMemory; diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 05ed7428c29..caf35326670 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -51,6 +51,7 @@ GpStatus WINGDIPAPI GdipSetPenStartCap(GpPen*,GpLineCap); GpStatus WINGDIPAPI GdipSetPenWidth(GpPen*,REAL); GpStatus WINGDIPAPI GdipCreateFromHDC(HDC,GpGraphics**); +GpStatus WINGDIPAPI GdipCreateFromHDC2(HDC,HANDLE,GpGraphics**); GpStatus WINGDIPAPI GdipCreateFromHWND(HWND,GpGraphics**); GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF*,GDIPCONST GpPointF*, ARGB,ARGB,GpWrapMode,GpLineGradient**);