Implementation of User32.PrintWindow (bug #18772)
Josselin Bardet
namjos at gmail.com
Fri Jun 5 09:24:17 CDT 2009
---
dlls/user32/painting.c | 14 ++++++++++++++
dlls/user32/user32.spec | 2 +-
include/winuser.h | 3 +++
3 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c
index 6c15ec6..49366eb 100644
--- a/dlls/user32/painting.c
+++ b/dlls/user32/painting.c
@@ -1548,3 +1548,17 @@ 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)
+{
+ UINT flags = PRF_CHILDREN | PRF_CLIENT | PRF_ERASEBKGND | PRF_OWNED;
+
+ if (!(nFlags & PW_CLIENTONLY)) flags |= PRF_NONCLIENT;
+ return SendMessageW( hwnd, WM_PRINT, (WPARAM)hdcBlt, (LPARAM)flags );
+}
+
+
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)
diff --git a/include/winuser.h b/include/winuser.h
index 3f202b1..e517363 100644
--- a/include/winuser.h
+++ b/include/winuser.h
@@ -1493,6 +1493,9 @@ WINUSERAPI BOOL WINAPI SetSysColors(INT,const INT*,const COLORREF*);
#define ENUM_CURRENT_SETTINGS ((DWORD) -1)
#define ENUM_REGISTRY_SETTINGS ((DWORD) -2)
+/* PrintWindow() flags */
+#define PW_CLIENTONLY 0x00000001
+
/****** Window classes ******/
typedef struct tagCREATESTRUCTA
--
1.6.0.4
--------------070601080205020805030606--
More information about the wine-devel
mailing list