Hi,
i use currently this kind of code to move a bitmap in the device context. The code follows:
CClientDC dc(this);
CDC dcTFT;
dcTFT.CreateCompatibleDC(&dc);
dcTFT.SelectObject(&picture);
CBitmap* pOldBitmap = dcTFT.SelectObject(&picture);
dc.BitBlt(X,Y,bmp.bmWidth, bmp.bmHeight, &dcTFT, 0,0,SRCCOPY);
dcTFT.SelectObject(pOldBitmap);
it works fine but i misunderstand why i should use pOldBitmap.
What would it happen if i try with only dc.BitBlt?
thanks,
Davide
i use currently this kind of code to move a bitmap in the device context. The code follows:
CClientDC dc(this);
CDC dcTFT;
dcTFT.CreateCompatibleDC(&dc);
dcTFT.SelectObject(&picture);
CBitmap* pOldBitmap = dcTFT.SelectObject(&picture);
dc.BitBlt(X,Y,bmp.bmWidth, bmp.bmHeight, &dcTFT, 0,0,SRCCOPY);
dcTFT.SelectObject(pOldBitmap);
it works fine but i misunderstand why i should use pOldBitmap.
What would it happen if i try with only dc.BitBlt?
thanks,
Davide