Commit 8d964870 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move WM_PRINT implementation from user32.

parent 88870884
......@@ -76,45 +76,6 @@ HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType )
/***********************************************************************
* DEFWND_Print
*
* This method handles the default behavior for the WM_PRINT message.
*/
static void DEFWND_Print( HWND hwnd, HDC hdc, ULONG uFlags)
{
/*
* Visibility flag.
*/
if ( (uFlags & PRF_CHECKVISIBLE) &&
!IsWindowVisible(hwnd) )
return;
/*
* Unimplemented flags.
*/
if ( (uFlags & PRF_CHILDREN) ||
(uFlags & PRF_OWNED) ||
(uFlags & PRF_NONCLIENT) )
{
WARN("WM_PRINT message with unsupported flags\n");
}
/*
* Background
*/
if ( uFlags & PRF_ERASEBKGND)
SendMessageW(hwnd, WM_ERASEBKGND, (WPARAM)hdc, 0);
/*
* Client area
*/
if ( uFlags & PRF_CLIENT)
SendMessageW(hwnd, WM_PRINTCLIENT, (WPARAM)hdc, uFlags);
}
/***********************************************************************
* DEFWND_DefWinProc
*
* Default window procedure for messages that are the same in Ansi and Unicode.
......@@ -157,10 +118,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
}
break;
case WM_PRINT:
DEFWND_Print(hwnd, (HDC)wParam, lParam);
return 0;
case WM_SYSCOMMAND:
return NC_HandleSysCommand( hwnd, wParam, lParam );
......
......@@ -2621,6 +2621,16 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
break;
}
case WM_PRINT:
if ((lparam & PRF_CHECKVISIBLE) && !is_window_visible ( hwnd )) break;
if (lparam & (PRF_CHILDREN | PRF_OWNED | PRF_NONCLIENT))
WARN( "WM_PRINT message with unsupported lparam %lx\n", lparam );
if (lparam & PRF_ERASEBKGND) send_message( hwnd, WM_ERASEBKGND, wparam, 0 );
if (lparam & PRF_CLIENT) send_message(hwnd, WM_PRINTCLIENT, wparam, lparam );
break;
case WM_APPCOMMAND:
{
HWND parent = get_parent( hwnd );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment