Multiple Device Contexts... - Programmers Heaven

Howdy, Stranger!

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

Categories

Multiple Device Contexts...

SephirothSephiroth Fayetteville, NC, USAPosts: 1,035Member
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.
[code]
...
HDC ChildDC, BufferDC;

ChildDC = GetDC(ChildWnd);
BufferDC = CreateCompatibleDC(ChildDC);

...
//Drawing to BufferDC
...

SelectObject(ChildDC, BufferDC); //Shows an empty screen
[/code]
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?

-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
Sign In or Register to comment.