首先定义
protected:
BITMAP bmp;
其次实现
/
// CExamineView drawing
void CExamineView::OnDraw(CDC* pDC)
{
CExamineDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
CBitmap cbmp;
cbmp.LoadBitmap(IDB_SPLASH);
CDC memdc;
memdc.CreateCompatibleDC(pDC);
memdc.SelectObject(&cbmp);
cbmp.GetBitmap(&bmp);
pDC->StretchBlt(0,0,1024,758,&memdc,0,0,bmp.bmWidth,bmp.bmHeight,SRCCOPY);
}