是否可以启动一个新进程并将其主窗口设置为我的MDI应用程序的子窗口?

时间:2021-04-07 20:44:16

Is it possible to start a new process and set it's main window as a child window of my MDI application?

是否可以启动一个新进程并将其主窗口设置为我的MDI应用程序的子窗口?

The scenario is: I have a MDI application and I want to start Adobe Acrobat as a child window of my MDI application.

场景是:我有一个MDI应用程序,我想启动Adobe Acrobat作为我的MDI应用程序的子窗口。

3 个解决方案

#1


In theory, I believe it's possible using SetParent.

从理论上讲,我相信使用SetParent是可能的。

However, in practice, this may be a bit more difficult than you'd expect. Also, you'll need to do work to syncronize the styles, etc.

但是,在实践中,这可能比您预期的要困难一些。此外,您需要做同步化样式等工作。

Just a thought, though - If you are trying to embed Acrobat Reader (not full Acrobat), you may be able to do this easier by embedding a webcontrol and having the acrobat reader plugin used in that...

不过只是想一想 - 如果你试图嵌入Acrobat Reader(不是完整的Acrobat),你可以通过嵌入webcontrol并使用acrobat reader插件来更容易地实现这一点......


Here are some samples of people making this work (at least partially):

以下是一些人的样本(至少部分):

Related SO question with workarounds for specific issues.

相关的SO问题以及针对特定问题的变通方法。

CodeProject article using SetParent

使用SetParent的CodeProject文章

Experts-exchange question about embedding a java app in a win32 app.

有关在win32应用程序中嵌入java应用程序的专家交流问题。

#2


I don't believe this is possible, at least not using SetParent. To quote from the SetParent documentation:

我不相信这是可能的,至少不使用SetParent。要引用SetParent文档:

An application can use the SetParent function to set the parent window of a pop-up, overlapped, or child window. The new parent window and the child window must belong to the same application.

应用程序可以使用SetParent函数设置弹出窗口,重叠窗口或子窗口的父窗口。新的父窗口和子窗口必须属于同一个应用程序。

#3


I don't think what you want is easily done, but it could be an option to try to integrate one of the open-source PDF-viewers (if you're prepared to go GPL as that is probably the license on most of them). Some links:

我不认为你想要的很容易,但是可以尝试集成一个开源的PDF查看器(如果你准备去GPL,因为这可能是他们大多数人的许可证) )。一些链接:

#1


In theory, I believe it's possible using SetParent.

从理论上讲,我相信使用SetParent是可能的。

However, in practice, this may be a bit more difficult than you'd expect. Also, you'll need to do work to syncronize the styles, etc.

但是,在实践中,这可能比您预期的要困难一些。此外,您需要做同步化样式等工作。

Just a thought, though - If you are trying to embed Acrobat Reader (not full Acrobat), you may be able to do this easier by embedding a webcontrol and having the acrobat reader plugin used in that...

不过只是想一想 - 如果你试图嵌入Acrobat Reader(不是完整的Acrobat),你可以通过嵌入webcontrol并使用acrobat reader插件来更容易地实现这一点......


Here are some samples of people making this work (at least partially):

以下是一些人的样本(至少部分):

Related SO question with workarounds for specific issues.

相关的SO问题以及针对特定问题的变通方法。

CodeProject article using SetParent

使用SetParent的CodeProject文章

Experts-exchange question about embedding a java app in a win32 app.

有关在win32应用程序中嵌入java应用程序的专家交流问题。

#2


I don't believe this is possible, at least not using SetParent. To quote from the SetParent documentation:

我不相信这是可能的,至少不使用SetParent。要引用SetParent文档:

An application can use the SetParent function to set the parent window of a pop-up, overlapped, or child window. The new parent window and the child window must belong to the same application.

应用程序可以使用SetParent函数设置弹出窗口,重叠窗口或子窗口的父窗口。新的父窗口和子窗口必须属于同一个应用程序。

#3


I don't think what you want is easily done, but it could be an option to try to integrate one of the open-source PDF-viewers (if you're prepared to go GPL as that is probably the license on most of them). Some links:

我不认为你想要的很容易,但是可以尝试集成一个开源的PDF查看器(如果你准备去GPL,因为这可能是他们大多数人的许可证) )。一些链接: