Introduction - If you have any usage issues, please Google them yourself
this source implement anchors and docking for controls when the dialog window is resized,you can use this simple class in MFC and non-MFC applications too.And you can use add/remove for dynamically created controls during running application.