Is it possible to start a new process and set it's main window as a child window of my MDI application?
The scenario is: I have a MDI application and I want to start Adobe Acrobat as a child window of my MDI application.
Is it possible to start a new process and set it's main window as a child window of my MDI application?
The scenario is: I have a MDI application and I want to start Adobe Acrobat as a child window of my MDI application.
In theory, I believe it's possible using 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...
Here are some samples of people making this work (at least partially):
Related SO question with workarounds for specific issues.
CodeProject article using SetParent
Experts-exchange question about embedding a java app in a win32 app.
I don't believe this is possible, at least not using SetParent. To quote from the SetParent documentation:
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.
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: