CDC dc2; dc2.CreateCompatibleDC(pDC); CBitmap *oldbmap = dc2.SelectObject(&m_bitmap); /*We copy the bitmap into the DC*/ pDC->BitBlt(0, 0, rect.Width(), rect.Height(), &dc2, 0, 0, SRCCOPY); dc2.SelectObject(oldbmap); CRgn rgn; rgn.CreateRoundRectRgn(0, 0, rect.Width(), rect.Height(), m_ptRound.x, m_ptRound.y); SetWindowRgn(static_cast<HRGN>(rgn.GetSafeHandle()), 1); rgn.Detach();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)