在单文档视图View类的Ondraw()函数中添加:
void CTestView::OnDraw(CDC* pDC)
{
CBitmap Bmp;
Bmp.LoadBitmap(IDB_BITMAP1); //IDB_BIRMAP1是你加载的位图资源
CDC memDC;
memDC.CreateCompatibleDC(pDC);
memDC.SelectObject(&Bmp);
pDC->BitBlt(0,0,600,600,&memDC,0,0,SRCCOPY);
}
在单文档视图View类的Ondraw()函数中添加:
void CTestView::OnDraw(CDC* pDC)
{
CBitmap Bmp;
Bmp.LoadBitmap(IDB_BITMAP1); //IDB_BIRMAP1是你加载的位图资源
CDC memDC;
memDC.CreateCompatibleDC(pDC);
memDC.SelectObject(&Bmp);
pDC->BitBlt(0,0,600,600,&memDC,0,0,SRCCOPY);
}
希望可以帮到你