Wrote a basic implementation of the WM_PRINT message.

This commit is contained in:
Francis Beaudet 1999-04-02 10:36:21 +00:00 committed by Alexandre Julliard
parent d96bc15580
commit 373db5cea2
1 changed files with 44 additions and 0 deletions

View File

@ -126,6 +126,46 @@ static void DEFWND_SetRedraw( WND* wndPtr, WPARAM wParam )
}
}
/***********************************************************************
* DEFWND_Print
*
* This method handles the default behavior for the WM_PRINT message.
*/
static void DEFWND_Print(
WND* wndPtr,
HDC hdc,
ULONG uFlags)
{
/*
* Visibility flag.
*/
if ( (uFlags & PRF_CHECKVISIBLE) &&
!IsWindowVisible(wndPtr->hwndSelf) )
return;
/*
* Unimplemented flags.
*/
if ( (uFlags & PRF_CHILDREN) ||
(uFlags & PRF_OWNED) ||
(uFlags & PRF_NONCLIENT) )
{
WARN(win,"WM_PRINT message with unsupported flags\n");
}
/*
* Background
*/
if ( uFlags & PRF_ERASEBKGND)
SendMessageA(wndPtr->hwndSelf, WM_ERASEBKGND, (WPARAM)hdc, 0);
/*
* Client area
*/
if ( uFlags & PRF_CLIENT)
SendMessageA(wndPtr->hwndSelf, WM_PRINTCLIENT, (WPARAM)hdc, PRF_CLIENT);
}
/***********************************************************************
* DEFWND_DefWinProc
*
@ -184,6 +224,10 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT msg, WPARAM wParam,
wndPtr->pVScroll = wndPtr->pHScroll = NULL;
return 0;
case WM_PRINT:
DEFWND_Print(wndPtr, (HDC)wParam, lParam);
return 0;
case WM_PAINTICON:
case WM_PAINT:
{