Void C monitoring Dlg: : resize ()
{
Float FSP [2].
POINT Newp;//get the size of the dialog now
CRect recta;
GetClientRect (& amp; Recta);//in the client area size
Newp. X=recta. Right - recta. Left;
Newp) y=recta) bottom - recta. Top;
FSP [0]=(float) Newp. X/Old. X.
FSP [1]=(float) Newp. Y/Old. Y;
CRect Rect;
Int woc.
CPoint OldTLPoint TLPoint;//the top left corner
CPoint OldBRPoint BRPoint;//at the bottom right
HWND hwndChild=: : GetWindow (m_hWnd, GW_CHILD);//list all control
While (hwndChild)
{
Woc=: : GetDlgCtrlID (hwndChild);//ID
GetDlgItem (woc) - & gt; GetWindowRect (the Rect);
The ScreenToClient (the Rect);
OldTLPoint=the Rect. TopLeft ();
TLPoint. X=long (OldTLPoint. * x FSP [0]).
TLPoint. Y=long (OldTLPoint. * y FSP [1]).
OldBRPoint=the Rect. BottomRight ();
BRPoint. X=long (OldBRPoint. * x FSP [0]).
BRPoint. Y=long (OldBRPoint. * y FSP [1]).
The Rect. SetRect (TLPoint BRPoint);
GetDlgItem (woc) - & gt; MoveWindow (the Rect, TRUE);
HwndChild=: : GetWindow (hwndChild GW_HWNDNEXT);
}
Old=Newp;
}
To change the several functions? consult