   Directdraw help required..
  I am trying to make an overlay buffer but i get the error DDERR_INVALIDCAPS when i call CreateSurface. The descriptor is set to:sdOverlay.dwSize = sizeof(sdBk);sdOverlay.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_BACKBUFFERCOUNT | DDSD_PIXELFORMAT;sdOverlay.ddsCaps.dwCaps = DDSCAPS_OVERLAY | DDSCAPS_FLIP | DDSCAPS_COMPLEX | DDSCAPS_VIDEOMEMORY;sdOverlay.dwBackBufferCount = 1;sdOverlay.dwWidth = 320;sdOverlay.dwHeight = 240;sdOverlay.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);sdOverlay.ddpfPixelFormat.dwRGBBitCount = 32;sdOverlay.ddpfPixelFormat.dwRBitMask = 0x00FF0000; sdOverlay.ddpfPixelFormat.dwGBitMask = 0x0000FF00;sdOverlay.ddpfPixelFormat.dwBBitMask = 0x000000FF;Any idea what could be the problem?? Need help.   
  Random guess - You can't have a complex surface as an overlay? (No idea, not used overlays before, and not use DDraw in about 8 years).Are you using the debug DirectX runtimes? Any debug output (No idea if you can even get debug output from DirectDraw)EDIT: Nope, ignore that. Have you had a look at This? Perhaps the pixel format is invalid?   