只是记录自己的UI库,对其他估计没什么帮助
void CListCtrlUI::ReFillRect(HDC hdc)
{
if (!m_pImage)
{
Graphics gs(hdc);
int strollBarW = m_pVScrollBar->GetWindowWidth();
m_memDrawSize.cy = m_header.GetHeight() + GetRowCount()*m_rowHeight;
m_pImage = new Bitmap(m_rect.GetWidth() - strollBarW, m_memDrawSize.cy);
Graphics bmpGraphics(m_pImage);
bmpGraphics.FillRectangle(&SolidBrush(Color(254, 253, 253, 253)), 0, 0, m_pImage->GetWidth(), m_pImage->GetHeight());
bmpGraphics.SetSmoothingMode(SmoothingModeAntiAlias);
Draw(bmpGraphics, hdc);
gs.ReleaseHDC(hdc);
}
}