打印控件的内容 [英] Printing the contents of a control
本文介绍了打印控件的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个MFC应用程序,它是作为SDI实现的。视图类具有CListCtrl成员,该成员显示在客户区域中。使用OnDraw()更新视图的其余部分。打印视图时有没有办法包含列表控件的内容?
谢谢
解决方案
< BLOCKQUOTE> YES。您可以自己实施打印。这就像在名为打印机DC的DC上绘图。
这是一个很好的示例如何做到:使用MFC轻松打印 [ ^ ]
感谢您的回复。
是的,我有一个主视图提供的打印机DC。下一个问题是如何获得另一个控件(在本例中为CListCtrl)在属于主窗口的打印机DC上绘制自己。我不确定这是否可行。
I have an MFC app which is implemented as an SDI. The view class has a CListCtrl member which is shown within the client area. The rest of the view is updated using OnDraw(). Is there a way to include the contents of the list control when I print the view?
Thanks
解决方案
YES. You can implement printing yourself. It is like drawing on a DC named "Printer DC".
Here is a good sample how to do it: Printing with MFC Made Easy[^]
Thanks for the reply.
Yes, I have a printer DC provided by the main view. The next problem is how to get another control (in this case a CListCtrl) to draw itself on the printer DC belonging to the main window. I am not sure if this is even possible.
这篇关于打印控件的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文