The WM_PRINT message is sent to a window to request that it draw itself in the specified device context, most commonly in a printer device context.
WM_PRINT hdc = (HDC) wParam; uFlags = lParam;
Value
Meaning
PRF_CHECKVISIBLE
Draw the window only if it is visible.
PRF_CHILDREN
Draw all visible children windows.
PRF_CLIENT
Draw the client area of the window.
PRF_ERASEBKGND
Erase the background before drawing the window.
PRF_NONCLIENT
Draw the nonclient area of the window.
PRF_OWNED
Draw all owned windows.
The DefWindowProc function processes this message based on which drawing option is specified: if PRF_CHECKVISIBLE is specified and the window is not visible, do nothing, if PRF_NONCLIENT is specified, draw the nonclient area in the given device context, if PRF_ERASEBKGND is specified, send the window a WM_ERASEBKGND message, if PRF_PRINTCLIENT is specified, send the window a WM_PRINTCLIENT message, if PRF_PRINTCHILDREN is set, send each visible child window a WM_PRINT message, if PRF_OWNED is set, send each visible owned window a WM_PRINT message.
DefWindowProc, WM_ERASEBKGND, WM_PRINTCLIENT
.