WM_PRINT message
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.
A window receives this message through its WindowProc function.
LRESULT CALLBACK WindowProc(
HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam
);
Parameters
-
wParam
-
A handle to the device context to draw in.
-
lParam
-
The drawing options. This parameter can be one or more of the following values.
Value Meaning - PRF_CHECKVISIBLE
Draws the window only if it is visible. - PRF_CHILDREN
Draws all visible children windows. - PRF_CLIENT
Draws the client area of the window. - PRF_ERASEBKGND
Erases the background before drawing the window. - PRF_NONCLIENT
Draws the nonclient area of the window. - PRF_OWNED
Draws all owned windows.
Remarks
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 specified device context, if PRF_ERASEBKGND is specified, send the window a WM_ERASEBKGND message, if PRF_CLIENT is specified, send the window a WM_PRINTCLIENT message, if PRF_CHILDREN 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.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
|
See also