   Win32 GDI DoubleBuffering question
  Ok im trying to implement double buffering and its not working and i cant find any articles on the toic, so here is what i am doingHDC screenDC = GetDC(NULL);HDC backDC = CreateCompatibleDC(screenDC);TransparentImage( backDC,(LONG)posX, (LONG)posY, (LONG)width, (LONG)height, bitmapDC,0, 0, (LONG)width, (LONG)height,RGB(255, 0, 255));//Going to make this constant for nowBitBlt(screenDC,0, 0,GetDeviceCaps(screenDC, HORZRES), GetDeviceCaps(screenDC, VERTRES),backDC,0, 0,SRCCOPY);ReleaseDC(0, backDC);Just turns the screen white. my objects do not draw...please help me!!!   
  Try changing this:HDC screenDC = GetDC(NULL);to this:HDC screenDC = GetDC(HWND);Where HWND is the handle to your window.Hope this helps!   ;  That previous post was from me.  Again, I hope it helps you out.   ;Double-buffing and memory-DC's Maybe that'll help ya out.relient.   ;  Thank you, that was exactly what i was looking for.thanks again.   ;  Just thought I'd mention that when you do get double-buffering working that it'll only be able to eliminate the flickering; you still may notice some shearing. There's unfortunately no way around this, as there's no way to force windows into copying the backbuffer during the vertical retrace, even though there really should be. You're also out of luck in detecting it yourself and trying to copy manually during the retrace because a) GDI doesn't expose the raster state to applications, and b) even if you knew it was happening, windows is message-based (read: not real-time) so theres no guarantee you'd get the messsage fast enough anyhow. The only way to respond to real-time events is to have the support of something at a lower level, like a device driver as OpenGL and DirectX do. I have seen one successful implimentation (which was a clever hack) which had the application spawning a custom device driver in a thread which implemented a callback to the render function though.In any event, flickering is the real enemy, shearing isn't too bad and its the same effect you'd see in any game if you have the V-sync disabled.   ;  Yeah i havnet noticed too much shearing, this is actually for the pocketPC.  I really dont want to right my own blitters and get into the game api so i am going to use GDI stuff for very simple games, like the 80's rerto classics.  But so far just double buffering tends to work pretty well, and elimenates the flicker all together.   