1、显示圆角窗口,且无标题栏
CRect rect;
GetWindowRect(&rect);
int nCaption = GetSystemMetrics(SM_CYCAPTION);
int nBorder = GetSystemMetrics(SM_CXSIZEFRAME);
CRgn bkRgn;
bkRgn.CreateRoundRectRgn(nBorder,nCaption+nBorder,rect.right-nBorder,rect.bottom-nBorder,20,20);
SetWindowRgn((HRGN)bkRgn.m_hObject,TRUE);
bkRgn.DeleteObject();
其中SetWindowRgn将只显示我们设定的区域bkrgn,其余位置不会显示出来。