Reputation: 3218
Sorry, I'm more of a C# person but I'm having to update some legacy MFC code. I'm starting to realize why C# was a good upgrade.
Upvotes: 2
Views: 2683
Reputation: 177133
You can use CWnd::MoveWindow:
http://msdn.microsoft.com/en-us/library/5bc5w1zz%28VS.80%29.aspx
If your GroupBox is for instance in an dialogue and has the control-Id IDC_MYGROUP then you can call in any method/event handler of the dialogue
GetDlgItem(IDC_MYGROUP)->MoveWindow(NewX,NewY,NewWidth,NewHeight,TRUE);
The last parameter TRUE (default) is for immediate repaint.
Upvotes: 2