CRect dlgNow;
GetWindowRect(&dlgNow);
CRect rect;
CButton* pBtn = (CButton*)GetDlgItem(IDC_BUTTONXXX);//获取按钮控件
pBtn->GetWindowRect(rect);
CWnd* pWnd=(CWnd*)GetDlgItem(IDC_EDITXXX);//其它控件(包括按钮)
pWnd->GetWindowRect(rect);
//往屏幕右下角位置移动
rect.left = rect.left + 100;
rect.right = rect.right + 100;
rect.top = rect.top + 100;
rect.bottom = rect.bottom + 100;
ScreenToClient(rect);//屏幕坐标转换为窗口坐标
pWnd->MoveWindow(rect);//移动控件位置