Pure embedded OCX controls

General TRichView support forum. Please post your questions here
Post Reply
Mr Andreas
Posts: 7
Joined: Tue Apr 24, 2012 4:19 am

Pure embedded OCX controls

Post by Mr Andreas »

Spotted this cool demo showing how to embed a YouTube video: http://www.trichview.com/forums/viewtopic.php?t=3703

I need to do something similar to the demo. What I need to be able to do is embed any registered OCX control (mainly basic controls to start with), not the resulting Delphi wrapper. Then I need to be able to save the file as an RTF and keep the OCX controls embedded in the file to then be opened in something like Word and still be able to see the controls. What do I need to do to achieve this?


-Andreas
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry for overlooking this question.

Does MS Word allow to embed arbitrary OCX controls directly in a document (not in a VBA form)?
Mr Andreas
Posts: 7
Joined: Tue Apr 24, 2012 4:19 am

Post by Mr Andreas »

Sergey Tkachenko wrote:Sorry for overlooking this question.

Does MS Word allow to embed arbitrary OCX controls directly in a document (not in a VBA form)?
Yes, as long as it is registered, arbitrary OCX controls can be inserted into normal Word documents.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

But how? I can see (in MS Word) the command for inserting object.
It corresponds not to inserting ocx, but to insertion of TOLEContainer.
Mr Andreas
Posts: 7
Joined: Tue Apr 24, 2012 4:19 am

Post by Mr Andreas »

Sergey Tkachenko wrote:But how? I can see (in MS Word) the command for inserting object.
It corresponds not to inserting ocx, but to insertion of TOLEContainer.
Hmm, yes, my mistake.

Ignoring this, how does one go about inserting non-container OCX controls that Words can insert, such as check-boxes, for example?
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Well, as I can see, there three ways to add controls in Word 2007.
1) Some new type of controls, that cannot be saved to RTF (Word shows a warning)
2) Some controls that saved as fields in RTF (unfortunately, a format of this field is not described in RTF specification)
3) ActiveX. They are saved almost exactly in the same way as OLE container document.
However, it may require some significant time to implement loading and saving of ActiveX in RTF. We are not ready to do this work in near future, sorry.
Post Reply