Question

I just want to create my own OLE server, which support in-place activation.
e.g. In TOlecontrol we can do following:

OleContainer1.CreateObject('WORD.Document',FALSE);

That is ok. Word document is embeded into the main application form. But when I tried:

OleContainer1.CreateObject('Server.MyOleServer',FALSE);

MyOleServer is allways opened in new separate "server" window - form (I also checked all values OleControl1.doVerb(), and OleControl1.AllowInPlace := true, but nothing helps. The "server" is very simple application, it contains just one empty Form...)

Was it helpful?

Solution

You can write a VCL component, and wrap it as an ActiveX control, and it should be useable as an ole control with inplace activation.

If you want control-like behaviour, don't write an application. Write a control. Subclass TPanel if you like, and put whatever controls you want inside it. Now wrap it as an ActiveX control.

Some more help on writing ActiveX controls, that will be applicable also to inplace editable OLE document views:

http://pweb.netcom.com/~cherrman/dl030.htm

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top