Multiple Device Contexts...

SephirothSephiroth Fayetteville, NC, USA
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?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!