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.

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 on other sites
Yes, that's pretty much it. I'd have a function
ResetDevice( bool a_bWindowed )
to reset the device with the proper parameters.

Thanks!