Export (0) Print
Expand All
Expand Minimize

CWnd::Print

Call this member function to draw the current window in the specified device context, which is most commonly in a printer device context.

void Print(
   CDC* pDC,
   DWORD dwFlags 
) const;

Parameters

pDC
A pointer to a device context.
dwFlags
Specifies the drawing options. This parameter can be one or more of these flags:
  • 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.

Remarks

CWnd::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.

See Also

CWnd Overview | Class Members | Hierarchy Chart | WM_PRINT | WM_PRINTCLIENT

Show:
© 2014 Microsoft