Click to See Complete Forum and Search --> : Setting a control's position relative to the GroupBox


anjanesh
May 3rd, 2007, 06:31 AM
Hi

Im trying to learn using Win32API with C using VC++ 6.0 via theForger's Win32 API tutorial (http://winprog.org/tutorial/).


I added a resource - in it, a ListBox is in a GroupBox. But when I move the GroupBox, the ListBox doesn't get moved. I may have to specify the GroupBox as a container to the ListBox. How do I do that ? How do I set the ListBox's position relative to the GroupBox ?

Thanks

hankdane
May 3rd, 2007, 11:54 PM
There isn't a way in the plain windows API to make dialog controls move as a group. A child window will move with its parent, but a group control does not act as a parent window.

I usually use EnumChildWindows() on the dialog, to move all controls within it a consistent delta.

anjanesh
May 4th, 2007, 12:08 AM
Having used VB 6 before, the design-view is not all that same is it ?