CPrintDialog::PrintCollate
确定排列的副本是否请求。
BOOL PrintCollate( ) const;
返回值
非零,如果用户在对话框中选择排列复选框;否则为0。
备注
在调用 DoModal 后确定打印机是否调用此函数应排列文档中的所有打印副本。
示例
// Display the Windows Print dialog box with Collate check box checked.
CPrintDialog dlg(FALSE, PD_ALLPAGES | PD_COLLATE | PD_NOPAGENUMS |
PD_HIDEPRINTTOFILE);
if (dlg.DoModal() == IDOK)
{
// If the collate check box is selected, then GetCopies() will return
// the number of copies printed. Otherwise, GetCopies() always
// returns 1. Then, the number of copies printed can be found from the
// DEVMODE structure of the printing device.
if (dlg.PrintCollate())
{
int num = dlg.GetCopies();
TRACE(_T("Number of copies printed = %d\n"), num);
}
else
{
LPDEVMODE devmode = dlg.GetDevMode();
TRACE(_T("Number of copies printed = %d\n"), devmode->dmCopies);
}
}
要求
Header: afxdlgs.h