我在一个FormView中使用如下代码嵌入了一个视,现在不知道如何实现打印及打印预览、打印设置。
CCreateContext pContext;
CWnd *pFrameWnd=this;
//pContext.m_pCurrentDoc=(CDocument*)RUNTIME_CLASS(CCodeEditDoc)->CreateObject();// 若无文档 ,可以自己建一个文档类
pContext.m_pNewViewClass=RUNTIME_CLASS(CCodeEditView);
CCodeEditView *pView=(CCodeEditView*)((CCodePrintFrame*)pFrameWnd)->CreateView(&pContext);
ASSERT(pView);
pCodeView=pView;
pView->ShowWindow(SW_NORMAL);
CCreateContext pContext;
CWnd *pFrameWnd=this;
//pContext.m_pCurrentDoc=(CDocument*)RUNTIME_CLASS(CCodeEditDoc)->CreateObject();// 若无文档 ,可以自己建一个文档类
pContext.m_pNewViewClass=RUNTIME_CLASS(CCodeEditView);
CCodeEditView *pView=(CCodeEditView*)((CCodePrintFrame*)pFrameWnd)->CreateView(&pContext);
ASSERT(pView);
pCodeView=pView;
pView->ShowWindow(SW_NORMAL);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货