views:

90

answers:

3

I'm trying to set something up so my main dialog has one or more child dialogs, and these are glued/docked to the outside of the main dialog - when the main dialog is minimised, the children are too, when main dialog moves, children move with it.

I'd tried setting child dialogs as having main dialog CWnd as parent, with CHILD style. But then they get clipped by the parent's boundary. If I set them as POPUP, they can be outside but then don't move with the parent.

I'm looking at putting an OnMove handler on the parent dialog, but is there something built-in? And, should child dialogs still be children of the main dialog... I assume they should?

This is VS2005 (I think VS2008 has some related functionality so I mention this).

+1  A: 

You need to implement the movement manually when they are popups, and yes they should be popups otherwise they will be clipped out.

Roel
A: 

As Roel says, your extra dialogs will need to be popups. I'm interested: what kind of UI is this? Is it WinAmp-style, where the windows snap to eachother?

Or are you doing some kind of expanding dialog? If it's an expanding dialog (with a More>> button on it, e.g.), then you can put all of the controls on the same dialog and play with the window rect when showing/hiding the extras.

Roger Lipscombe
Kind of like WinAmp. I can't decide yet if it's better than having the whole dialog grow/shrink as sections are collapsed - both are being tested.
John
+1  A: 

I'm new to SO. Not sure if I can refer to an external article. I guess this is what you are looking for.

I started to write this class because I'm often in need to popup additional dialogs around the main one. Often these dialogs can give some trouble to the user; for example, he must move/close them one by one... A solution that could give the application a more solid aspect and that could make the management of the various windows easier could be, to dock all dialogs side by side (like Winamp does, for example).

Jujjuru
An answer should contain just enough of the linked article to show why it deserves to be an answer. You can use the "quote" feature if you want to copy some of the link.
Mark Ransom