In a header file (*.h)
public:
CBitmap bmpPlayer;
CDC* m_pdcPlayerMem;
Then in the implementation file (*.c, *.cpp)
void CView::OnDraw(CDC* pDC)
{
bmpPlayer.LoadBitmap(IDBMP_PLAYER1);
m_pdcPlayerMem->CreateCompatibleDC(NULL);
m_pdcPlayerMem->SelectObject(&bmpPlayer);
pDC->BitBlt(600, 300, 150, 200, m_pdcPlayerMem,
0, 0, SRCCOPY);
}
Or something like that ...