Jump to content
  • Advertisement
Sign in to follow this  
Martaver

[.net] Fullscreen Direct3D Device creation : Top Level Window? Huh?

This topic is 5395 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 initialize my d3d device to fullscreen, I get the following error : Direct3D9: (ERROR) :Device Window must be a top level window. CreateDevice fails. At first I assumed that it was referring to the parent form of my application, but something's crazy. I'm passing it the windows form that is the base form of my application. ie. the one with the static main in it - the root of the whole application. I'm even setting the 'TopLevel' bool to true and making sure it's true before I try to create the device. No juice. So what on earth does it take to make a Form a 'Top Level Window' enough for D3D?

Share this post


Link to post
Share on other sites
Advertisement
You may be feeding only part of the client area to your form rather then the whole thing... eg if you have a menu bar on your window, you might only be giving it the bit under the menu bar.

Share this post


Link to post
Share on other sites
I once had this error when restoring a lost device, turned out that the window I referred to didn't have the focus.
But then again that was using c++, so maybe this isn't relevant to your problem...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!