Two things to keep in mind here. First, I'm not a programmer so consequently I've been known to come up with some really bad code and practices. Secondly, I'm not sure I understand exactly what you're trying to do but this may help.
Create main window and all your "independant" child windows.
Code: Select all
HWND_A = OpenWindow(#Window_A, etc...
HWND_B = OpenWindow(#Window_B, etc...
HWND_C = OpenWindow(#Window_C, etc...
HWND_D = OpenWindow(#Window_D, etc...
HWND_E = OpenWindow(#Window_E, etc...
Then use SetParent_() to have the main window adopt those child windows.
Code: Select all
SetParent_(HWND_A,HWND_B)
SetParent_(HWND_A,HWND_C)
SetParent_(HWND_A,HWND_D)
SetParent_(HWND_A,HWND_E)
You can use HideWindow() to hide or expose childen independantly as desired.
Hiding or minimizing the main window will always affect the children as well.
If you get the handle of the desktop you can use SetParent_(HWND_DeskTop,HWND_B) to make the desktop the parent of #Window_B if you want. The previous SetParent assignment here for HWND_B would automatically be cancelled. In other words, disregard previous custody and use SetParent freely thoughout your code whenever you want to change the parent of a window.
SetParent_() can also be used on external apps so you could make NotePad the child of your own app window. (Probably not wise to make the desktop a "Child" of one of your own windows so I wont recommend it.)