怎么在VC做的ACTIVEX中实现打印预览??
我在ACTIVEX中创建了CFrameWnd,CView 可是在CVIEW中创建的CDialogBar在create的时候总是失败,但我检查了其中的pParent,nIDResource是AFX_IDD_PREVIEW_TOOLBARVC自己带的ID这些对象都是有效的,很奇怪,这种预览方式在CDialog的应用中是实现是没有问题的,这样创建也没保错,就是在Activex这种情况下就出现创建不了了,郁闷ing!
// Create the toolbar from the dialog resource
pView->m_pToolBar = new CDialogBar;
if (!pView->m_pToolBar->Create(pParent, MAKEINTRESOURCE(nIDResource),
CBRS_TOP, AFX_IDW_PREVIEW_BAR))
{
TRACE0("Error: Preview could not create toolbar dialog.\n");
pParent->OnSetPreviewMode(FALSE, pState); // restore Frame Window
delete pView->m_pToolBar; // not autodestruct yet
pView->m_pToolBar = NULL;
pView->m_pPreviewState = NULL; // do not delete state structure
delete pView;
return FALSE;
}