Hi,

As next of the discussion on the bug 18772 (http://bugs.winehq.org/show_bug.cgi?id=18772), I send here the implemenation for User32.PrintWindow function

I've tested it with an application that was crashing because of this unimplemented function.

Regards
Jos
>From 8be8f14c3bf4041661ca1057d72fd48caa14ea50 Mon Sep 17 00:00:00 2001
From: Josselin Bardet <[email protected]>
Date: Thu, 4 Jun 2009 20:01:16 +0200
Subject: Implementation of User32.PrintWindow (bug #18772)

---
 dlls/user32/painting.c  |   11 +++++++++++
 dlls/user32/user32.spec |    2 +-
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c
index 6c15ec6..fa73d19 100644
--- a/dlls/user32/painting.c
+++ b/dlls/user32/painting.c
@@ -1548,3 +1548,14 @@ BOOL WINAPI ScrollDC( HDC hdc, INT dx, INT dy, const RECT *lprcScroll,
 {
     return USER_Driver->pScrollDC( hdc, dx, dy, lprcScroll, lprcClip, hrgnUpdate, lprcUpdate );
 }
+
+/*************************************************************************
+ *              PrintWindow (USER32.@)
+ *
+ */
+BOOL WINAPI PrintWindow( HWND hwnd, HDC hdcBlt, UINT nFlags)
+{
+    return( SendMessageA( hwnd, WM_PRINT, (WPARAM)hdcBlt, PRF_CHILDREN | PRF_CLIENT | PRF_ERASEBKGND | PRF_NONCLIENT | PRF_OWNED ) );
+}
+
+
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec
index cae0bed..b46e272 100644
--- a/dlls/user32/user32.spec
+++ b/dlls/user32/user32.spec
@@ -533,7 +533,7 @@
 @ stdcall PostQuitMessage(long)
 @ stdcall PostThreadMessageA(long long long long)
 @ stdcall PostThreadMessageW(long long long long)
-# @ stub PrintWindow
+@ stdcall PrintWindow(long long long)
 @ stdcall PrivateExtractIconExA(str long ptr ptr long)
 @ stdcall PrivateExtractIconExW(wstr long ptr ptr long)
 @ stdcall PrivateExtractIconsA (str long long long ptr ptr long long)
-- 
1.6.0.4




Reply via email to