GDI+ 雙緩沖字體模糊
只是記錄自己的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);
}
}


浙公網安備 33010602011771號