void CToolTestDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
{
CDialog::OnSize(nType, cx, cy);
// TODO: 在此处添加消息处理程序代码
switch(nType)
{
case SIZE_MAXIMIZED:
m_Edit.MoveWindow(200,100,cx/5,cy/8);
break;
case SIZE_RESTORED:
if(m_Edit.GetSafeHwnd()) //必须加上此判断,不然会出错
m_Edit.MoveWindow(10,10,200,100);
default:
break;
}
}