class CFfDlg : public CDialog
{
// Construction
public:
CFfDlg(CWnd* pParent = NULL);
BOOL forl;
int biliw;
         int bilih;// standard constructor
         CRect rect1,rect2;

};BOOL CFfDlg::OnInitDialog()
{
CDialog::OnInitDialog();
       ...........................
GetClientRect(&rect2);
GetDlgItem(IDC_EDIT1)->GetWindowRect(&rect1);
biliw=rect2.right-rect1.right;
bilih=rect2.bottom-rect1.bottom;
forl=TRUE;

return TRUE;  
}void CFfDlg::OnSize(UINT nType, int cx, int cy) 
{
CDialog::OnSize(nType, cx, cy);

if(forl==TRUE){
CWnd   *   pWnd   =   GetDlgItem(IDC_EDIT1);   
  if(   pWnd   )   
  {   
    CRect   rctmp;   
    GetWindowRect(&rctmp);
CRect rectm(rect1.left,rect1.top,rctmp.right-biliw,rctmp.bottom-bilih);
  pWnd->MoveWindow(&rectm);   
  }    }
}