Win32: Can I create an application that hosts other applications?

I was wondering, how are you going to write an application that mainly hosts other applications inside it?

The reason I ask is because I would like to create an application that "wins" my current explosion of open windows. I used to use virtual window managers, and they are good and thatโ€™s all, but I could do as much with the application as I mention.

In addition, does anyone know about a simple / intuitive application for restricting windows in the "regions" of your screen? Something like GridMove, but more intuitive and less fragile?

+3
source share
5 answers

You can create a window, then you can list all Windows with the WS_OVERLAPPEDWINDOW style, select those that belong to the application that you want to place, then call SetParent in the window, set the parent element to the window you created. You can also use FindWindow to find a window by its name.

All the windows inside the house never leave the borders of the window of the house, but they still adhere to all the same rules. You can still click and drag windows, etc.

The problem is that if the application inside the house creates another window, its parent will most likely be the desktop window, and not the home window.

+1
source

I think what you are describing is usually called Window Manager. The Windows shell itself is a (bad) example of a window manager. You can explore some alternatives. I know that there has been some success in KDE being ported to Windows, so you can see the current status of this project.

Microsoft also provides PowerToy (IIRC), which gives you virtual desktop support, but it is very bad. Did you think that you just get a second monitor (and perhaps a utility like MultiMon Taskbar to get a second taskbar on another monitor)?

+1
source

Here is the code that uses FindWindow / SetParent to create a tabbed view combining various Jedi Window Dock applications

I also wrote an application (not free, not open source) that takes this idea a bit further than WindowTabs .

The only caveat I would give you is not all applications, such as the parent. If you write .NET, there is "Gotcha's" (that's why WindowTabs does not use parental rights).

Also, once you make SetParent, you join threads at the Win32 level, which means that if you hang, they are all toasts.

+1
source

Several document interfaces can help you.

Despite a few votes, I agree with this answer because the OP never indicated the source of the "window explosion." I saw business applications that opened several windows at once (or users who opened several instances of โ€œsave timeโ€), where MDI would be a pleasant opportunity for them.

If OP is a powerful user who needs a different window manager, because he runs several applications at once, then this really does not apply. This is also not a problem that I would handle - it will find a way to have fewer windows.

0
source

In general, there is always a virtual machine.

This may be excessive or may not work depending on the specifics of what you are trying to do. But VMWare will allow you to copy / paste files and text between your virtual machine and the local machine, so this is far from the same as a real window manager. System requirements aren't even that outrageous considering how much iTunes + a typical browser eats up.

0
source

All Articles