本文整理汇总了C++中PrintContext::ToStartOfBand方法的典型用法代码示例。如果您正苦于以下问题:C++ PrintContext::ToStartOfBand方法的具体用法?C++ PrintContext::ToStartOfBand怎么用?C++ PrintContext::ToStartOfBand使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PrintContext
的用法示例。
在下文中一共展示了PrintContext::ToStartOfBand方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GrindOutPrintJob
//.........这里部分代码省略.........
int nError = 0;
pc.SaveStartOfBand();
for (;;)
{
if (pc.m_fDoubleSided && (nFromPage != nToPage))
{
//
// 1. Put up the dialog telling the user we are about to begin.
//
CPmwDialog BeginDialog(IDD_DOUBLE_SIDED_BEGIN);
if (BeginDialog.DoModal() != IDOK)
{
nError = -1;
break;
}
// We need to do the double-sided thing.
//
// 2. Print the first half of the document.
//
// Print the key sheet now if it goes first.
if ((pc.m_wDoubleSidedType & DBLPRN_FRONTKEYMASK) == DBLPRN_FrontKeyFirst)
{
if ((nError = PrintKeySheetFront(pc)) != 0)
{
break;
}
}
// Print the document pages.
pc.ToStartOfBand();
if ((nError = PrintLabelsFront(pc)) != 0)
{
break;
}
// Print the key sheet now if it goes last.
if ((pc.m_wDoubleSidedType & DBLPRN_FRONTKEYMASK) == DBLPRN_FrontKeyLast)
{
if ((nError = PrintKeySheetFront(pc)) != 0)
{
break;
}
}
// End the first print job.
EndPrintDoc(pc, 0);
//
// 3. Put up the dialog telling the user to re-insert the stack.
//
CPmwDialog NotifyDialog(IDD_DOUBLE_SIDED_NOTIFY);
if (NotifyDialog.DoModal() != IDOK)
{
nError = -1;
break;
}
//
// 4. Print the second half of the document.
//