思路:响应WM_SIZE消息,重设窗口rgn
代码:
void CIntercomeDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
CRgn rgn;
CRect rc;
GetWindowRect(&rc);
rc-=rc.TopLeft();
rgn.CreateRoundRectRgn(rc.left,rc.top,rc.right,rc.bottom,30,30);
SetWindowRgn(rgn,TRUE);
}