PDA

View Full Version : Change and read video settings using winapi?



waran
08-01-2008, 06:59 AM
Hello,
some time ago I did a small project which is able to force minimize games
(or plain applications, but that's not the point) which refuse to go down using
standard methods like Alt+Tab or WinKey.

You can find it and its source here: http://home.arcor.de/m3ep/software/Minimizer.7z

However:
This tool doesn't touch video settings (resolution, gamma, brightness, contrast)
because I don't know how to do it. I searched the MSDN-Library up and down but
everything I found was for Windows CE exclusively.

So you only get optimal results if you run your game with desktop settings.
This is a small drawback which I want to fix.

cronodragon
08-01-2008, 04:56 PM
Hi!

Great idea! I hate minimizing ETQW myself just to use the messenger.

I have an idea on how you can complete this. Just minimize the application and setup a fullscreen window with OpenGL, which is easy to access in Windows. Check out the Delphi code which uses the Winapi:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=01

Direct link:
http://nehe.gamedev.net/data/lessons/delphi/lesson01.zip

Then close the OGL window and you will have the restored desktop. :D

I just tried this with old ET (http://enemy-territory.4players.de:1041/news.php) and works, although the application seems to be forcing the mouse position :P That might be another problem to solve.

If you finish this, please let me know, it's very useful.

waran
08-01-2008, 06:35 PM
I played a bit ... the mouse cursor now tends to show itself at all times
in WolfET ... however the BOSS-version needs one click on the screen
now until sound vanishes.

Thank you for the link - I don't think "own fullscreen window" will work
smoothly but the article gave me some basic ideas.

At least changing resolution works now! Thats already something :D