阻止Office保存OLE对象的设备上下文的内容 [英] Prevent Office from saving contents of device context of OLE object
问题描述
您好,
当您使用嵌入的OLE对象保存Office文档(例如Powerpoint)时,它会保存
when you save an Office Document (e.g. Powerpoint) with an embedded OLE object, it saves
1。 OLE对象的序列化数据_and_
$
2. OLE对象在其设备上下文(DC)上绘制的所有内容
1. the serialization data of the OLE object _and_
2. everything the OLE object has drawn on its Device Context (DC)
我想知道你是否可以分辨办公室不保存DC的内容?并且,在打开文档时重新创建图像?
$
I'm wondering if you can tell Office not to save the contents of the DC? And, instead recreate the image when opening the document?
如果通过OLE对象在DC上动态绘制大图像,这将特别有意义。
This would especially make sense, if a large image is drawn dynamically on the DC by the OLE object.
Alex
推荐答案
这是容器从控件中获取视觉效果的方法:
This is what containers do to get visuals out of the control:
我认为您可以选择不将OLE对象实现为控件,因此容器不会尝试缓存图像,或者实现IViewObject2来指示
你想要在对象未运行时自定义演示文稿。
I think you can choose to not implement your OLE object as a control, thus the container won't try to cache the image, or implement IViewObject2 to indicate that you want to customize the presentation when the object is not running.
这篇关于阻止Office保存OLE对象的设备上下文的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!