PDA

View Full Version : How to host the other process's window in a program?



tszzp
2nd February 2010, 11:30
I want to write a program, it can host the other process's window, the other process can work standalone, when I host the other process's window, the other process's window hasn't system menu, hasn't titlebar, can't resize. how to implement it? thanks.

high_flyer
2nd February 2010, 14:17
I guess it can be done by asking the system for the window handle you want.
But most likely we can offer you a more "sane" way to accomplish what it is you want to do, if you explain to us what exactly you are trying to achieve.

tszzp
9th February 2010, 06:43
I guess it can be done by asking the system for the window handle you want.
But most likely we can offer you a more "sane" way to accomplish what it is you want to do, if you explain to us what exactly you are trying to achieve.

You can get my problem from the attachment's jpg file. I want to put the process B's window and process C's window in the process A's window,
and the process B and process C then run standalone, and them also can embed in process A, only the launch's parameter is different. you can get the detail information in the attachment's jpg. thanks. how to implement it?

high_flyer
9th February 2010, 09:36
As I said, you can probably use system calls to get the id of the windows you want, if it is the only way you want to implement your application.
This (http://msdn.microsoft.com/en-us/library/ms633500%28VS.85%29.aspx) function (for windows, for linux you can google) might be a good string point.

tszzp
10th February 2010, 04:52
Do you mean is use different code in different platform?

high_flyer
10th February 2010, 09:48
Yes, since these are system calls, you will have to have the correct code per system.

gargoylle_ltk
10th February 2010, 11:34
If you are on Linux/X11 you may be able to use QX11EmbedWidget (http://doc.trolltech.com/4.1/qx11embedwidget.html) and QX11EmbedContainer (http://doc.trolltech.com/4.1/qx11embedcontainer.html)