自己的“就地激活”对象连接服务器

发布于 2024-09-28 08:25:31 字数 450 浏览 1 评论 0原文

我只想创建自己的 OLE 服务器,它支持就地激活。
例如,在TOlecontrol中,我们可以执行以下操作:

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

没关系。 Word文档嵌入到主申请表中。但是当我尝试时:

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

MyOleServer 总是在新的单独的“服务器”窗口中打开 - 表单 (我还检查了所有值 OleControl1.doVerb()OleControl1.AllowInPlace := true,但没有任何帮助。“服务器”是非常简单的应用程序,它只包含一张空表格...)

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...)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

醉生梦死 2024-10-05 08:25:31

您可以编写一个 VCL 组件,并将其包装为 ActiveX 控件,并且它应该可以用作具有就地激活的 ole 控件。

如果您想要类似控件的行为,请不要编写应用程序。写一个控件。如果您愿意,可以对 TPanel 进行子类化,并将您想要的任何控件放入其中。现在将其包装为 ActiveX 控件。

有关编写 ActiveX 控件的更多帮助,也适用于就地可编辑的 OLE 文档视图:

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文