本文整理汇总了C++中CBCGPRibbonBar::ShowBackstagePrintView方法的典型用法代码示例。如果您正苦于以下问题:C++ CBCGPRibbonBar::ShowBackstagePrintView方法的具体用法?C++ CBCGPRibbonBar::ShowBackstagePrintView怎么用?C++ CBCGPRibbonBar::ShowBackstagePrintView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBCGPRibbonBar
的用法示例。
在下文中一共展示了CBCGPRibbonBar::ShowBackstagePrintView方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BCGPPrintPreview
//*********************************************************************************
BCGCBPRODLLEXPORT void BCGPPrintPreview (CView* pView)
{
ASSERT_VALID (pView);
#ifndef BCGP_EXCLUDE_RIBBON
CFrameWnd* pParentFrame = BCGPGetParentFrame (pView);
ASSERT_VALID (pParentFrame);
CFrameWnd* pToplevelFrame = pParentFrame;
if (pToplevelFrame->IsKindOf (RUNTIME_CLASS (CBCGPMDIChildWnd)))
{
pToplevelFrame = pToplevelFrame->GetTopLevelFrame ();
}
CBCGPRibbonBar* pWndRibbonBar = DYNAMIC_DOWNCAST (CBCGPRibbonBar,
pToplevelFrame->GetDlgItem (AFX_IDW_RIBBON_BAR));
if (pWndRibbonBar != NULL && pWndRibbonBar->ShowBackstagePrintView())
{
return;
}
#endif
if (g_pActivePrintPreview != NULL &&
CWnd::FromHandlePermanent (g_pActivePrintPreview->GetSafeHwnd ()) != NULL)
{
return;
}
CPrintPreviewState *pState= new CPrintPreviewState;
ASSERT (g_pPrintPreviewlocaRes == NULL);
g_pPrintPreviewlocaRes = new CBCGPLocalResource;
if (!pView->DoPrintPreview (IDD_BCGBAR_RES_PRINT_PREVIEW, pView,
RUNTIME_CLASS (CBCGPPrintPreviewView), pState))
{
TRACE0("Error: OnFilePrintPreview failed.\n");
AfxMessageBox (AFX_IDP_COMMAND_FAILURE);
delete pState; // preview failed to initialize, delete State now
}
ASSERT (g_pPrintPreviewlocaRes == NULL);
}