读书人

怎么获取当前正在文档信息

发布时间: 2012-12-18 12:43:41 作者: rapoo

如何获取当前正在文档信息。
我想做一个记录电脑打印输出了,主要是不知道怎么获取当前打印机正在
打印的文档的详细信息,文档的名称,页数等。求助。
[最优解释]
CPrintInfo Class Members
Data Members

m_bDocObject Contains a flag indicating whether the document being printed is a DocObject.
m_dwFlags Specifies DocObject printing operations.
m_nOffsetPage Specifies offset of a particular DocObject's first page in a combined DocObject print job.
m_pPD Contains a pointer to the CPrintDialog object used for the Print dialog box.
m_bDirect Contains a flag indicating whether the document is being printed directly (without displaying the Print dialog box).
m_bPreview Contains a flag indicating whether the document is being previewed.
m_bContinuePrinting Contains a flag indicating whether the framework should continue the print loop.
m_nCurPage Identifies the number of the page currently being printed.
m_nNumPreviewPages Identifies the number of pages displayed in the preview window; either 1 or 2.
m_lpUserData Contains a pointer to a user-created structure.
m_rectDraw Specifies a rectangle defining the current usable page area.
m_strPageDesc Contains a format string for page-number display.


Attributes

SetMinPage Sets the number of the first page of the document.
SetMaxPage Sets the number of the last page of the document.
GetMinPage Returns the number of the first page of the document.
GetMaxPage Returns the number of the last page of the document.
GetOffsetPage Returns the number of the pages preceding the first page of a DocObject item being printed in a combined DocObject print job.
GetFromPage Returns the number of the first page being printed.
GetToPage Returns the number of the last page being printed.

[其他解释]
凡事找找msdn
http://support.microsoft.com/kb/160129/zh-cn

关于页数
http://www.cppblog.com/franksunny/archive/2012/05/24/18031.html

enjoy
[其他解释]
GetPrinter
EnumJobs

如何获取打印机和打印作业的状态
[其他解释]
WK,这么多资料,只能酱油

读书人网 >VC/MFC

热点推荐