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);
}
}

 

 

posted @ 2018-04-09 21:04  奥雷连诺  阅读(316)  评论(0编辑  收藏  举报