Luke Benstead : user32: Implement PrintWindow.
Alexandre Julliard
julliard at winehq.org
Wed Dec 2 10:22:11 CST 2009
Module: wine
Branch: master
Commit: 7fc8aed47f09849df0f6524eb9fbdcded8abfb9d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7fc8aed47f09849df0f6524eb9fbdcded8abfb9d
Author: Luke Benstead <kazade at gmail.com>
Date: Tue Dec 1 17:06:56 2009 +0000
user32: Implement PrintWindow.
---
dlls/user32/painting.c | 15 +++++++++++++++
dlls/user32/user32.spec | 2 +-
include/winuser.h | 3 +++
3 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c
index 4af522d..883b0c1 100644
--- a/dlls/user32/painting.c
+++ b/dlls/user32/painting.c
@@ -1549,3 +1549,18 @@ 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_ERASEBKGND | PRF_OWNED | PRF_CLIENT;
+ if(!(nFlags & PW_CLIENTONLY))
+ {
+ flags |= PRF_NONCLIENT;
+ }
+ SendMessageW(hwnd, WM_PRINT, (WPARAM)hdcBlt, flags);
+ return TRUE;
+}
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec
index 326aedb..8cdc24c 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 e6b4741..91fca34 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)
+/* Used for PrintWindow */
+#define PW_CLIENTONLY 0x00000001
+
/****** Window classes ******/
typedef struct tagCREATESTRUCTA
More information about the wine-cvs
mailing list