在 MFC 应用程序中打印
如何使用 MFC 基于对话框的应用程序打印文档?我做了一个打印按钮。单击此按钮后,我想要打印一些文档或一些文本。
How can I print a document using MFC Dialog Based Application? I have made a print button. After clicking on this button, I want print of some document or some text.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以创建一个不可见的
CHtmlEditCtrl
控件,并使用SetDocumentHTML(LPCTSTR)
方法将文本加载到其中,然后调用PrintDocument()
方法。You can create an invisble
CHtmlEditCtrl
control and load your text to it withSetDocumentHTML(LPCTSTR)
method and then callPrintDocument()
method.