void CMainFrame::OnSize(UINT nType, int cx, int cy){CRgn m_rgn;CRect rc;GetWindowRect(&rc); //获得窗口矩形rc -= rc.TopLeft();m_rgn.CreateRoundRectRgn(rc.left, rc.top, rc.right, rc.bottom, 100, 100); //根据窗口矩形创建一个圆角矩形SetWindowRgn
后面还会看下不规则窗口的实现