VC++实现打印 打印控制 打印输出 打印工作证
2019-12-21 21:07:46 1.42MB VC MFC 打印程序 打印
1
1.调用方法_打印预览 CPrintFrame* pWndPrint = new CPrintFrame; CCreateContext context; context.m_pNewViewClass = RUNTIME_CLASS(CPrintView); context.m_pCurrentFrame = pWndPrint; context.m_pCurrentDoc = NULL; context.m_pLastView = NULL; pWndPrint->Create(NULL,"打印",WS_OVERLAPPEDWINDOW,CFrameWnd::rectDefault, NULL,NULL,0,&context); pWndPrint->PrintPreview(); 2.调用方法_直接打印 CPrintFrame* pWndPrint = new CPrintFrame; CCreateContext context; context.m_pNewViewClass = RUNTIME_CLASS(CPrintView); context.m_pCurrentFrame = pWndPrint; context.m_pCurrentDoc = NULL; context.m_pLastView = NULL; pWndPrint->Create(NULL,"打印",WS_OVERLAPPEDWINDOW,CFrameWnd::rectDefault, NULL,NULL,0,&context); pWndPrint->Print(); 3.参数设置 可设置打印方向,映射模式、打印页数等,测试样例使用的是DMORIENT_LANDSCAPE(横向打印),MM_LOMETRIC,10页 好用的话,大家给个好评哦
2019-12-21 19:50:58 4KB MFC 打印 文档 VS2008
1