IViewObject

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

Hi,

How I get the interface IViewObject of a RichTextBox Control?
I would like to call the Draw Method with C#.

Thanks
Eric
 
How I get the interface IViewObject of a RichTextBox Control?
I would like to call the Draw Method with C#.
IViewObject is a COM interface. You'd have to dive into Interop to
retrieve that. That road would probably starti with adding a reference to
the COM library called "Microsoft Rich Text Control".

Why not call the Refresh() method on the .NET RichTextBox?

Greetings,
Wessel
 
Hi,

I'd rather conjure up a false PAINTSTRUCT and posted the WM_PAINT message to
the control (unless you have a managed way to ask the control to paint
itself). Messing with OLE interfaces would require good knowledge of the
underlying ActiveX control hosting stuff.
 
I'd rather conjure up a false PAINTSTRUCT and posted the WM_PAINT
message to the control (unless you have a managed way to ask the control
to paint itself). Messing with OLE interfaces would require good
knowledge of the underlying ActiveX control hosting stuff.
Why not call Refresh() on the .NET control?

That will cause a WM_PAINT to be send.

Greetings,
Wessel
 
Thanks,
But reason to use the interface, is because I want to copy the RTF content
to a picture/bitmap.
For that I need to call the Draw Method of IViewObject.

Eric
 
Back
Top