The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: shankle on January 21, 2006, 05:35:03 PM

Title: Display Resolutions
Post by: shankle on January 21, 2006, 05:35:03 PM
The screen I want to display is rather full and I don't have much room to scrunch
things to the left. When I go from a 20" monitor to a 17" monitor I lose data.
I am using "SystemParametersInfo, spi_getworkarea, 0, addr RR, 0. This works for
most screens but not a full one. I have defined RR Rect {?}
and the following : mov eax, RR.right,  mov holdright, eax  and the other 3 similiarly.
I am using these in the Textout, Rectangle and Bitblt api's.
Maybe the CreateFont size or the screen resolution of the monitor effect things???
Any suggestions would be most appreciated.
JPS

Title: Re: Display Resolutions
Post by: Tedd on January 24, 2006, 06:16:37 PM
I think you should re-ask your question, with a better explanation (and a screenshot?) - it's unclear what you're asking.

My guess is that you're creating a window/dialog with many controls, but there is not enough space to fit them all on a low resolution screen(??)
Title: Re: Display Resolutions
Post by: shankle on January 25, 2006, 04:32:54 AM
The data is going past the right hand side of the screen and
going past the bottom of the screen.
The data fits on a 19" screen with a resolution of 800 x 600.
It doesn't fit on a 17" monitor with a resolution of 600 x 480.

I guess my question is how can I change the  resolution of the monitor
programatically? OR should I try to change the resolution?

I thought the code I stated in my previous message would handle this.
JPS
Title: Re: Display Resolutions
Post by: zooba on January 25, 2006, 04:58:57 AM
General answer, no. If the user has specified that their screen will use that resolution your program should deal with it.

If you're going to take over the whole screen then it's not as bad, but you should still allow the user to change what resolution it's using.

I'm not sure what part of the world you're from but 640x480 is practically an obsolete screen resolution. Windows XP doesn't even allow it as a regular choice (it's only in the compatibility options, and even there it doesn't work!).

Probably the best option assuming you can't adjust your window to handle it is to notify the user that their screen resolution is not suitable for your application. If they really want to use it, they'll change it.

Cheers,

Zooba :U
Title: Re: Display Resolutions
Post by: Tedd on January 25, 2006, 12:13:42 PM
I would suggest that you re-design the window so that it will fit into less than 800x600 (640x480 is an unrealistic expectation - why would anyone limit to this on a 17" monitor??)
This means, either making it scroll (add scrollbars) though it could be annoying, or change the layout into tabs, or maybe multiple windows.
It's a general design principle to not put too much into one window - it just makes it difficult to use.
Is it totally necessary to squash everything into a single window?

And yes, changing settings (eg. screen resoultion) without asking the user first is a bad idea. And a very good way to make them delete your program. Also, monitors have a maximum screen resolution, so you can't assume the mode will even be available.