用VC制作动态弹出的对话框

来源:互联网 发布:mysql列名区分大小写吗 编辑:程序博客网 时间:2024/05/17 07:51

ShowWindow(SW_HIDE);
 CRect dlgRect;
 GetClientRect(&dlgRect);
 CPoint centerPoint;
 centerPoint.x = dlgRect.Width()/2;
 centerPoint.y = dlgRect.Height();
 CRgn testrgn;
 this->ShowWindow(SW_HIDE);
 int m = GetSystemMetrics(SM_CYSIZEFRAME);
 this->MoveWindow(200,200,600,300);
 for (int i = 10; i < dlgRect.Width()/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();
 }

原创粉丝点击