Original Post
hi, I'm fairly new to directdraw and am running into a few problems - when you set the cooperative mode, what should you normally pass as the handle to the window? I tried NULL, HWND_DESKTOP(include windows.h) and eventually i created a basic win32 app which displayed a window and passed the handle of that which was the only thing that worked. here's the code: when I pass a handle to a window after CreateWindowEx it shows it at fullscreen at 800x600 res. any ideas?
#include <ddraw.h>
int main() {
HGRESULT check;
LPDIRECTDRAW lpdd;
check = DirectDrawCreate(NULL, &lpdd, NULL);
if(check != DD_OK)
return -1;
check = lpdd->setCooperativeMode( <???> , DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
if(check != DD_OK)
return -1;
check = lpdd->setDisplayMode(800, 600, 8);
if(check != DD_OK)
return -1;
}
