News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Windows 7 + screen resolution

Started by hotrod, February 07, 2010, 11:20:25 AM

Previous topic - Next topic

hotrod

I purchased a new laptop with a 1920 x 1080 resolution after building this http://www.masm32.com/board/index.php?topic=13195.0 on a 1200 x 800. The dialog and controls look fine on the new display, but the portion at the bottom where all the work is being done has shrank as I would expect leaving it distorted. Why would part of it change and the rest not? Thanks...

MichaelW

One problem I see in your code is that it contains hard-coded coordinate values in screen units (pixels) for the MoveToEx and LineTo functions, and to initialize a RECT structure. Such values are not generally compatible with a dialog. Coordinates and width and height values in a dialog are specified in dialog template units. Dialog template units are based on the average width and height of the font used, allowing the dialog box to have essentially the same on-screen proportions and appearance (but not the same apparent size) across different resolutions and/or aspect ratios. One way around this problem is to derive any pixel units you need from dialog template units. See MapDialogRect.
eschew obfuscation

hotrod

I see what you mean, off to the research department. Thanks MichealW. I need one of those speech enabled machines that can write code with all the schooling I am going to.