19,468
社区成员
发帖
与我相关
我的任务
分享
void CMsgTipDlg::DrawMsg(CDC *pDC)
{
CRect rc;
GetClientRect(&rc);
CDC memDC;
memDC.CreateCompatibleDC(pDC);
CBitmap bmp;
bmp.CreateCompatibleBitmap(pDC,rc.Width(),rc.Height());
CBitmap *pOldBmp = memDC.SelectObject(&bmp);
memDC.FillSolidRect(rc,theApp.m_sysINIFile.GetMsgTipConfig().nMsgTipBkColor);
DrawGrid(&memDC,rc);//用兼容DC绘制你的图形内容
pDC->BitBlt(0, 0, rc.Width(),rc.Height(), &memDC, 0, 0, SRCCOPY) ;
pDC->SelectObject(pOldBmp);
bmp.DeleteObject();
memDC.DeleteDC();
}