|
重新画背景?是这样吗?
我有试过在每次显示前重新画的,可是还是不行啊.
CDC *pDC = this->GetDC();
ASSERT(pDC);
ASSERT(m_bmpBkgnd);
HDC hMemDC = CreateCompatibleDC( pDC->m_hDC );
CBitmap bmp;
bmp.Attach( m_bmpBkgnd );
BITMAP bm;
bmp.GetBitmap( &bm );
SelectObject( hMemDC, m_bmpBkgnd );
BitBlt( pDC->m_hDC, 0, 0, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY );
DeleteDC( hMemDC );
bmp.Detach();
bmp.DeleteObject(); |
|