void CDLG08Dlg::OnBnClickedButton1()
{
CRect rect;
this->GetWindowRect(&rect);//获取窗口大小
int off = 10;
for (int i = 0; i < 20; i++)
{
rect.OffsetRect(off, 0);//窗体区域偏移
this->MoveWindow(&rect, true);//窗体移动
if (off == -10)
off = 10;
else
off = -10;
::Sleep(100);
}
}