Sign in to follow this  
Dzogchener

Hosting window created in separate process

Recommended Posts

Hi, My problem is that I have a window created in process A and I want to host it in Process B. Is this possible? I want the message handling to happen in Process A, and not cause a load on the UI thread of Process B. Thanks for any ideas, D.

Share this post


Link to post
Share on other sites
What I am trying to do is like what WinAmp does when you connect two windows together (snapped) and then drag the main window around and the attached window moves with it. Thats my first problem, but then I would like the attached window to be in a different process.

One reason for the process separation is for safety. We have logical "applications" but want to show the windows from one within another - docking etc.

Thanks for your reply.

D.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dzogchener
What I am trying to do is like what WinAmp does when you connect two windows together (snapped) and then drag the main window around and the attached window moves with it. Thats my first problem, but then I would like the attached window to be in a different process.

One reason for the process separation is for safety. We have logical "applications" but want to show the windows from one within another - docking etc.

Thanks for your reply.

D.
Doing things like this with other processes is pretty ugly. If you don't want to actually do processing for a window in another process, then you can simply subclass it. That'll let you replace the window proc with your own function, and catch WM_MOVING, etc messages.

See Using Window Procedures - Subclassing a Window.

Share this post


Link to post
Share on other sites
Hi,

The reason for not creating the windows in-proc is because they are in apps written in C++, legacy apps. We are trying to work with existing tools we have written without a re-write. They will get ported - but as you, its baout priorities. So we are just trying to see how feasible it is.

I looked at the MSDN link and it doesnt work when the window is not in the same process. I am now trying to use SetWindowLong to set a hook proc, but its failing to work unfortunately....will pop over to the .Net group.

Thanks for your help.

D.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this