Archived

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

Mathematix

How do I alter the resolution when game is running??

Recommended Posts

Hi all, How do I alter the screen reolution when running a Win32 application, then restore the desktop resolution when closing the application? I have searched my books and www.winprog.org, but no joy. Thanks!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Use http://msdn.microsoft.com/ for all your Win32 programming search needs.

Plug in "ChangeDisplaySettings" in the search box you get at that URL, and you should be all set.

Share this post


Link to post
Share on other sites
I don't recommend changing the resolution like that. I had to use it to change the display resolution at my school (they set them to 640x480 and locked out the display page of the control panel) and got some weird side effects, like the start menu not resizing to fit the new res (this was under win2k by the way).

Also, using that function can screw around with people's icon arrangements. I don't want to have to reorganize my desktop every time I'm finished with a program.

If you're writing a little utility for your own use, there's nothing wrong with changing the resolution like that, but if you plan on releasing your program, I recommend looking for a better way of accomplishing your goal (perhaps you can use a graphics API that has fullscreen support and can change the screen resolution without changing the desktop resolution, though it would probably be time-consuming to convert your program to it).

[edited by - glassJAw on August 31, 2003 4:02:26 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by glassJAw
I don't recommend changing the resolution like that. I had to use it to change the display resolution at my school (they set them to 640x480 and locked out the display page of the control panel) and got some weird side effects, like the start menu not resizing to fit the new res (this was under win2k by the way).

Also, using that function can screw around with people's icon arrangements. I don't want to have to reorganize my desktop every time I'm finished with a program.

If you're writing a little utility for your own use, there's nothing wrong with changing the resolution like that, but if you plan on releasing your program, I recommend looking for a better way of accomplishing your goal (perhaps you can use a graphics API that has fullscreen support and can change the screen resolution without changing the desktop resolution, though it would probably be time-consuming to convert your program to it).

[edited by - glassJAw on August 31, 2003 4:02:26 PM]


Yeah, ChangeDisplaySettings() is giving me a little grief, like the window not appearing.

Will use the alternative methods.



[edited by - mathematix on August 31, 2003 7:54:29 PM]

Share this post


Link to post
Share on other sites