I need to be able to check the resolution of a display device like a monitor and be able during the program run to change the application and frame size to match. I don't want to change the resolution of the monitor to match the program.
Suggestions
Printable View
I need to be able to check the resolution of a display device like a monitor and be able during the program run to change the application and frame size to match. I don't want to change the resolution of the monitor to match the program.
Suggestions
I've been working with this problem lately aswell. I found a good way to do it.
Take a blank application and set the window size to the max resolution size (something crazy) like 3000x3000. Then using the Window Control object, at the start of the frame set the X and Y Position of the frame window to 0. Then you can detect the width and height of the frame window by using FrameWinXSize( "Window Control" ) and FrameWinYSize( "Window Control" ) respectively.
All you need to do is adjust the constraints of your game to these window sizes. For example if you wanted a HUD to display in the bottom right of your window, despite the screen's resolution you would put something like:
Set X position of Hud to FrameWinXSize( "Window Control" ) - 200.
Set Y position of Hud to FrameWinXSize( "Window Control" ) - 100.
This method works both for windowed and fullscreen games. However I think that it still draws things that are 'offscreen' so it might be a good idea to have original window size of your game as something more reasonable like 1600x1200. But have it as larger if you need to support very high resolutions.
Thanks netninja the work around you suggested helped to solve my problem.
Perhaps some more work will be done in the future to fix this problem in MMF and the Windows Control object.