在看孙鑫的视频 有一个讲窗口收缩的
我完全照它一样做的 可是不能实现收缩void CDlg::OnButton1() 
{
CString str;
if(GetDlgItemText(IDC_BUTTON1,str),str=="收缩<<")
{
SetDlgItemText(IDC_BUTTON1,"扩展>>");
}
else
{
SetDlgItemText(IDC_BUTTON1,"收缩<<");
} static CRect rectLarge;
static CRect rectSmall; if(rectLarge.IsRectNull())
{
CRect rectSeparator;
GetWindowRect(&rectLarge);
GetDlgItem(IDC_SEPARATOR)->GetWindowRect(&rectSeparator);
rectSmall.left=rectLarge.left;
rectSmall.top=rectLarge.top;
rectSmall.right=rectLarge.right;
rectSmall.bottom=rectLarge.bottom;
}
if(str=="收缩<<")
{
SetWindowPos(NULL,0,0,rectSmall.Width(),rectSmall.Height(),
SWP_NOMOVE | SWP_NOZORDER );
}
else
{
SetWindowPos(NULL,0,0,rectLarge.Width(),rectLarge.Height(),
SWP_NOMOVE | SWP_NOZORDER);
}} 我跟着调试到SetWindowPos函数  这个参数也是跟视频的例子一样的 为什么不能实现窗口收缩 ?