MFC 对话框 关于打印指定文件,该如何解决
MFC 对话框 关于打印指定文件
在对话框里面有没有直接能调用的关于打印的类?求大神解答
------解决方案--------------------
CWnd::Print
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
Call this member function to draw the current window in the specified device context, which is most commonly in a printer device context.
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 aWM_ERASEBKGND message.
If PRF_PRINTCLIENT is specified, send the window aWM_PRINTCLIENT message.
If PRF_PRINTCHILDREN is set, send each visible child window aWM_PRINT message.
If PRF_OWNED is set, send each visible owned window a WM_PRINT message.
CWnd Overview
------解决方案--------------------
Class Members
------解决方案--------------------
Hierarchy Chart
See Also WM_PRINT,WM_PRINTCLIENT
CWnd::PrintClient
void PrintClient( CDC* pDC, DWORD dwFlags ) const;
Parameters
pDC
A pointer to a device context.
dwFlags
Specifies 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
Call this member function to draw any window in the specified device context (usually a printer device context).
CWnd Overview
------解决方案--------------------
Class Members
------解决方案--------------------
Hierarchy Chart
See Also WM_PRINTCLIENT
在对话框里面有没有直接能调用的关于打印的类?求大神解答
------解决方案--------------------
CWnd::Print
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
Call this member function to draw the current window in the specified device context, which is most commonly in a printer device context.
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 aWM_ERASEBKGND message.
If PRF_PRINTCLIENT is specified, send the window aWM_PRINTCLIENT message.
If PRF_PRINTCHILDREN is set, send each visible child window aWM_PRINT message.
If PRF_OWNED is set, send each visible owned window a WM_PRINT message.
CWnd Overview
------解决方案--------------------
Class Members
------解决方案--------------------
Hierarchy Chart
See Also WM_PRINT,WM_PRINTCLIENT
CWnd::PrintClient
void PrintClient( CDC* pDC, DWORD dwFlags ) const;
Parameters
pDC
A pointer to a device context.
dwFlags
Specifies 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
Call this member function to draw any window in the specified device context (usually a printer device context).
CWnd Overview
------解决方案--------------------
Class Members
------解决方案--------------------
Hierarchy Chart
See Also WM_PRINTCLIENT