Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

nabeshin

DDraw init problem

This topic is 5549 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Whenever I try to set the cooperation of the DirectDraw object to anything but DDSCL_NORMAL, it tells me I''m giving it invalid parameters. I can''t understand how it cannot work, since I''m following a very basic DirectX example. Anyone have a clue? Here''s the snippet that doesn''t work:
	LPDIRECTDRAW7 lpdd  = NULL;
	if(FAILED(DirectDrawCreateEx(NULL, (void **)&lpdd, IID_IDirectDraw7, NULL)))
	{
		MessageBox(NULL, "Could not create DirectDraw surface!", "Error!", NULL);
		return(0); 
	}

	MessageBox(NULL, 
		DXGetErrorDescription8(
			lpdd->SetCooperativeLevel(hWnd, DDSCL_ALLOWMODEX | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_ALLOWREBOOT)), "Error", NULL);

Share this post


Link to post
Share on other sites
Advertisement
Try disabling modex flag.
Not all drivers support it.

Also, DirectDrawCreateEx does not create a surface as your error message seems to suggest. (I'm sure you already know that.)

EDIT:
And, ironically, the message box may not let the cooperation level change (the switch to fullscreen). Try to use some other form of debug message.

Sorry, i can't test it myself right now, not on my own machine, you see


[edited by - Nik02 on August 6, 2003 7:15:05 AM]

Share this post


Link to post
Share on other sites
doh!

i solved it. it wasn''t the fullscreen parameters that were invalid. i gave it an invalid window handle!

idiotskij! *bangs head in keyb*

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!