I understand that I understand what will happen if I select an “object” in the “device contect” and if this object is a brush, font, pen: therefore, the symbols of these objects are used to draw on the device context.
However, I do not understand what happens after I select a bitmap image in the context of the device, and especially why it is necessary.
I have a program that someone is doing
HDC dc = ::GetDC(hWnd); ffBitmap = ::CreateCompatibleBitmap(dc, windowWidth, windowHeight); ffMemoryDc = ::CreateCompatibleDC(dc); hOldBitmap = (HBITMAP) ::SelectObject(ffMemoryDc, ffBitmap);
and then calls ffMemoryDc, and then * BitBlt * s ffMemoyDc in the actual window device context.
BitBlt ( dc, 0, 0, windowWidth, windowHeight, ffMemoryDc, 0, 0, SRCCOPY );
The ffBitmap variable is not specified anywhere in the entire program, but if I did not select SelectObject (ffBitmap), nothing is drawn, so this is .
I would be grateful if someone could shed light on what is happening here.
René nyffenegger
source share