Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Multiple Device Contexts...
OK, I'm trying to smooth out the re-drawing of my map viewing window in the level editor I'm making. I had been just getting the DC and drawing to it, but thatof course flickers, so I figure I can do my own double-buffering with little effort. I added a second DC, made it compatible with the window DC, and draw to it, but don't know quite how to then select it into the window DC.
HDC ChildDC, BufferDC;
ChildDC = GetDC(ChildWnd);
BufferDC = CreateCompatibleDC(ChildDC);
//Drawing to BufferDC
SelectObject(ChildDC, BufferDC); //Shows an empty screen
So how exactly would I go about this? The map size is 32000x32000 pixels, so I thought that using an HBITMAP may be a bad idea. Any ideas?
0 · ·