Is what I have below anywhere near correct?
Will DirectCast do a QueryInterface?
Would you do it differently?
Thanks for any help
'Applications can retrieve an ITextDocument pointer from a rich edit
control.
'To do this, send an EM_GETOLEINTERF ACE message to retrieve an IRichEditOle
object from a rich edit control.
'Then, call the object's QueryInterface method to retrieve an ITextDocument
pointer.
'Dim mITextDocument As tom.ITextDocume nt
Dim mREOleInterface As Object
WinApi.SendMess age(RichTextBox 1.Handle, Rtf.EM_GETOLEIN TERFACE, IntPtr.Zero,
mREOleInterface )
mITextDocument = DirectCast(mREO leInterface, tom.ITextDocume nt)
Will DirectCast do a QueryInterface?
Would you do it differently?
Thanks for any help
'Applications can retrieve an ITextDocument pointer from a rich edit
control.
'To do this, send an EM_GETOLEINTERF ACE message to retrieve an IRichEditOle
object from a rich edit control.
'Then, call the object's QueryInterface method to retrieve an ITextDocument
pointer.
'Dim mITextDocument As tom.ITextDocume nt
Dim mREOleInterface As Object
WinApi.SendMess age(RichTextBox 1.Handle, Rtf.EM_GETOLEIN TERFACE, IntPtr.Zero,
mREOleInterface )
mITextDocument = DirectCast(mREO leInterface, tom.ITextDocume nt)