对话框从大到小

来源:互联网 发布:学python用什么系统 编辑:程序博客网 时间:2024/04/28 12:11
ShowWindow(SW_HIDE);
 CRect dlgRect;
 GetClientRect(&dlgRect);
 CPoint centerPoint;
 centerPoint.x=dlgRect.Width()/2;
 centerPoint.y=dlgRect.Height()/2;
 CRgn testrgn;
 this->ShowWindow(SW_HIDE);
 int m=GetSystemMetrics(SM_CYSIZEFRAME);
 for(int i=+10;i<dlgRect.Width()/2+2*m;i+=1)
 {
  testrgn.CreateRectRgn(centerPoint.x-i,centerPoint.y-i,centerPoint.x+i,centerPoint.y+i);
  SetWindowRgn((HRGN) testrgn,TRUE);
  ShowWindow(SW_SHOW);
  CenterWindow();
  testrgn.DeleteObject();
 }
原创粉丝点击