I have a dialog based application which contain controls such treectrl,listsctrl and group box contain all the buttons control. I am working in Visual Studio 2010 Professional Edition.All controls are placed in the Dialog at design time and no control is created at run time.
Using
int desktopW = GetSystemMetrics(SM_CXVIRTUALSCREEN);
int desktopH = GetSystemMetrics(SM_CYVIRTUALSCREEN);
got the width and height of window, then found the relative position of the controls.
Using SetWindowPos
try to change the width and height of various control, if new width and height is less than old control width and height.
But that involves a lot of calculation.
Is there exist any easy way to change the control position/scaling based on window size?