主题:[讨论]MFC 背景图片显示不了
void CMainFrame::DrawBmpTitleBar(CDC *pDC, CRect rcTitle)
{
CBitmap bmp;
bmp.LoadBitmap(IDB_BITMAP);
CBrush brush;
brush.CreatePatternBrush(&bmp);
pDC->FillRect(rcTitle,&brush);
}
void CStudentView::OnDraw(CDC* pDC)
{
// TODO: Add your specialized code here and/or call the base class
CStudentDoc*pDoc=GetDocument();
ASSERT_VALID(pDoc);
CDC MemDC;
MemDC.CreateCompatibleDC(NULL);
MemDC.SelectObject(pDoc->m_Bitmap);
pDC->BitBlt(0,0,pDoc->m_nWidth,pDoc->m_nHeight,&MemDC,0,0,SRCCOPY);
}
视图里背景图片显示不了 求解(如果可以详细解答的可以加我QQ1913769550)多谢看帖
{
CBitmap bmp;
bmp.LoadBitmap(IDB_BITMAP);
CBrush brush;
brush.CreatePatternBrush(&bmp);
pDC->FillRect(rcTitle,&brush);
}
void CStudentView::OnDraw(CDC* pDC)
{
// TODO: Add your specialized code here and/or call the base class
CStudentDoc*pDoc=GetDocument();
ASSERT_VALID(pDoc);
CDC MemDC;
MemDC.CreateCompatibleDC(NULL);
MemDC.SelectObject(pDoc->m_Bitmap);
pDC->BitBlt(0,0,pDoc->m_nWidth,pDoc->m_nHeight,&MemDC,0,0,SRCCOPY);
}
视图里背景图片显示不了 求解(如果可以详细解答的可以加我QQ1913769550)多谢看帖