• Advertisement
Sign in to follow this  

Converting a DX app to windowed mode

This topic is 4609 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

Let's say I have a DirectDraw application (also uses DirectInput...) that only runs in full screen mode. Also, assume Alt-TAB is handled in ddraw and DirectInput takes care to check whether it lost the device when we GetDeviceState. Now, suppose I want to convert it to a windowed-only application (so, no switching between the two). What change do I need to make in the code to get this done? Is it just a trivial flag change in the DirectDraw initialization, or is it more serious than that? I assume setting the depth is out of the question, and I just need to let it take up the default screen depth (which would be annoying cause of those bloody 24-bit-ers hehe). What else do I need to keep track of? Also, if I DO want to implement some kind of switching between the two, all I need to add is code to reset DDraw and then reload everything, right?

Share this post


Link to post
Share on other sites
Advertisement
Yes, that's pretty much it. I'd have a function
ResetDevice( bool a_bWindowed )
to reset the device with the proper parameters.

Share this post


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

  • Advertisement