FrameRgn问题圆角边框

BOOL CTTTDlg::OnEraseBkgnd(CDC* pDC)  
{
CRgn m_rgn,m_framrgn;
CRect rc;   
GetWindowRect(&rc);   
rc -= rc.TopLeft();   
m_rgn.CreateRoundRectRgn(rc.left,rc.top,rc.right,rc.bottom,10,10);   
CDC * pdc=GetDC();
CBrush brush;
brush.CreateSolidBrush(RGB(100, 100, 100));
pdc->FrameRgn(&m_rgn,&brush,1,1);
ReleaseDC(pdc);
SetWindowRgn(m_rgn,TRUE);	// TODO: Add extra initialization here	
return CDialog::OnEraseBkgnd(pDC);
}

转帖: http://topic.csdn.net/u/20110712/10/632a9d3c-f703-47cd-8661-8a7ba5164506.html

你可能感兴趣的:(initialization)