Original Post
Here's the code snippet this is all about:
Thanks,
/Alexander "SoulReaper" Deruwe
Edited by - SoulReaper on 3/13/00 12:02:19 PM
// base directdraw interface
if(FAILED(DirectDrawCreate(NULL, &g_lpdd, NULL)))
{
return 0;
}
// now version 4 of the interface
if(FAILED(g_lpdd->QueryInterface(IID_IDirectDraw4, (LPVOID *)&g_lpdd4)))
{
return 0;
}
// set the cooperative level
if(FAILED(g_lpdd4->SetCooperativeLevel(g_hwnd, DDSCL_FULLSCREEN / DDSCL_ALLOWMODEX / DDSCL_EXCLUSIVE / DDSCL_ALLOWREBOOT)))
{
return 0;
}
// set display mode
temp = g_lpdd4->SetDisplayMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP);
Now, SetDisplayMode gives a DDERR_INVALIDPARAMS error.
I have these defines:
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480
#define SCREEN_BPP 16
I have installed the DX7 SDK, and use Windows 2000 Professional.
I'm working with version 4 of the interfaces, because I have LaMothe's book, and it deals with those.
I heard this was possible with COM (and none of the other functions have given me problems).
I'd really appreciate some help on this.