2

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.

bsh152s
  • 3,178
  • 6
  • 51
  • 77

1 Answers1

2

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.

Slauma
  • 175,098
  • 59
  • 401
  • 420