1. [WIN] screen resolution problem

Hi, all.

I've developed a program which call Win32Lib routines. Works and looks fine on
the machine on which it was devloped (19 inch monitor; set to 1024/768
resolution).
when the  program is moved to a system (also Win 98) with a 14 inch monitor set
to 648/480, the type face appears to be quite a bit larger, even overrunning the
boundaries of the PushBttons and the Lists in which data is displayed. The text
on various screens is also no longer properly centered.

Does anyone have any suggestions to avoid this? Any suggestions appreciated.

Thanks.

Josh

new topic     » topic index » view message » categorize

2. Re: [WIN] screen resolution problem

I'm guessing the problem is that text is measured in points not pixels. And
the size of pixel changes with screen resolution and physical dimension of
the screen.

You might need to recalculate the point size needed by calling
getTextExtent() for a given piece of text and seeing how many actual pixel
it takes up. Then adjusting the point size via setFont() until the text fits
into the control area.

Alternately, make the controls a few pixels bigger than the minimum needed.

----- Original Message -----
From: "joshua goldberg" <futures8 at bellsouth.net>
To: "EUforum" <EUforum at topica.com>
Sent: Friday, August 24, 2001 3:08 PM
Subject: [WIN] screen resolution problem


>
> Hi, all.
>
> I've developed a program which call Win32Lib routines. Works and looks
fine on the machine on which it was devloped (19 inch monitor; set to
1024/768 resolution).
> when the  program is moved to a system (also Win 98) with a 14 inch
monitor set to 648/480, the type face appears to be quite a bit larger, even
overrunning the
> boundaries of the PushBttons and the Lists in which data is displayed. The
text on various screens is also no longer properly centered.
>
> Does anyone have any suggestions to avoid this? Any suggestions
appreciated.
>
> Thanks.
>
> Josh
>
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: [WIN] screen resolution problem

Derek, how do you get the screen pixel dimensions?


...george

----- Original Message -----
From: "Derek Parnell" <ddparnell at bigpond.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: [WIN] screen resolution problem


>
> I'm guessing the problem is that text is measured in points not pixels.
And
> the size of pixel changes with screen resolution and physical dimension of
> the screen.
>
> You might need to recalculate the point size needed by calling
> getTextExtent() for a given piece of text and seeing how many actual pixel
> it takes up. Then adjusting the point size via setFont() until the text
fits
> into the control area.
>
> Alternately, make the controls a few pixels bigger than the minimum
needed.
>
> ----- Original Message -----
> From: "joshua goldberg" <futures8 at bellsouth.net>
> To: "EUforum" <EUforum at topica.com>
> Sent: Friday, August 24, 2001 3:08 PM
> Subject: [WIN] screen resolution problem
>
>
> >
> > Hi, all.
> >
> > I've developed a program which call Win32Lib routines. Works and looks
> fine on the machine on which it was devloped (19 inch monitor; set to
> 1024/768 resolution).
> > when the  program is moved to a system (also Win 98) with a 14 inch
> monitor set to 648/480, the type face appears to be quite a bit larger,
even
> overrunning the
> > boundaries of the PushBttons and the Lists in which data is displayed.
The
> text on various screens is also no longer properly centered.
> >
> > Does anyone have any suggestions to avoid this? Any suggestions
> appreciated.
> >
> > Thanks.
> >
> > Josh
> >
> >
> >
> >
> >
>
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: [WIN] screen resolution problem

I can see that getSystemMetrics(atom code) will probably do the trick, but I
can't find anywhere what the values of 'code' are to return things of
question. Like pixel width and height of screen size. Is there a list
somewhere?

...george

----- Original Message -----
From: "George Walters" <gwalters at sc.rr.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: [WIN] screen resolution problem


>
> Derek, how do you get the screen pixel dimensions?
>
>
> ...george
>
> ----- Original Message -----
> From: "Derek Parnell" <ddparnell at bigpond.com>
> To: "EUforum" <EUforum at topica.com>
> Sent: Friday, August 24, 2001 7:23 AM
> Subject: Re: [WIN] screen resolution problem
>
>
> >
> > I'm guessing the problem is that text is measured in points not pixels.
> And
> > the size of pixel changes with screen resolution and physical dimension
of
> > the screen.
> >
> > You might need to recalculate the point size needed by calling
> > getTextExtent() for a given piece of text and seeing how many actual
pixel
> > it takes up. Then adjusting the point size via setFont() until the text
> fits
> > into the control area.
> >
> > Alternately, make the controls a few pixels bigger than the minimum
> needed.
> >
> > ----- Original Message -----
> > From: "joshua goldberg" <futures8 at bellsouth.net>
> > To: "EUforum" <EUforum at topica.com>
> > Sent: Friday, August 24, 2001 3:08 PM
> > Subject: [WIN] screen resolution problem
> >
> >
> > >
> > > Hi, all.
> > >
> > > I've developed a program which call Win32Lib routines. Works and looks
> > fine on the machine on which it was devloped (19 inch monitor; set to
> > 1024/768 resolution).
> > > when the  program is moved to a system (also Win 98) with a 14 inch
> > monitor set to 648/480, the type face appears to be quite a bit larger,
> even
> > overrunning the
> > > boundaries of the PushBttons and the Lists in which data is displayed.
> The
> > text on various screens is also no longer properly centered.
> > >
> > > Does anyone have any suggestions to avoid this? Any suggestions
> > appreciated.
> > >
> > > Thanks.
> > >
> > > Josh
> > >
> > >
> > >
> > >
> > >
>
>

new topic     » goto parent     » topic index » view message » categorize

5. Re: [WIN] screen resolution problem

thanks, Brian. I didn't catch that link. this should be most helpful..

...george

----- Original Message -----
From: "Brian Broker" <bkb at cnw.com>
To: "EUforum" <EUforum at topica.com>
Subject: RE: [WIN] screen resolution problem


>
> George,
>
> The Win32Lib help docs for this function contain a link to MSDN online
> where you can find a list of codes.  However, if you just want the
> screen size, try "getRect( Screen )".
>
> getRect returns the pixel positions of the top-left corner and the
> bottom right corner. For Screen, Printer and bitmaps the top-left is
> always 0,0 and thus right is the width and bottom is the height.
>
> -- Brian
>
>
> George Walters wrote:
> > I can see that getSystemMetrics(atom code) will probably do the trick,
> > but I
> > can't find anywhere what the values of 'code' are to return things of
> > question. Like pixel width and height of screen size. Is there a list
> > somewhere?
> >
> > ...george
> >
> > ----- Original Message -----
> > From: "George Walters" <gwalters at sc.rr.com>
> > To: "EUforum" <EUforum at topica.com>
> > Sent: Friday, August 24, 2001 7:55 AM
> > Subject: Re: [WIN] screen resolution problem
> >
> >
> > >
> > > Derek, how do you get the screen pixel dimensions?
> > >
> > >
> > > ...george
> > >
> > > ----- Original Message -----
> > > From: "Derek Parnell" <ddparnell at bigpond.com>
> > > To: "EUforum" <EUforum at topica.com>
> > > Sent: Friday, August 24, 2001 7:23 AM
> > > Subject: Re: [WIN] screen resolution problem
> > >
> > >
> > > >
> > > > I'm guessing the problem is that text is measured in points not
pixels.
> > > And
> > > > the size of pixel changes with screen resolution and physical
dimension
> > of
> > > > the screen.
> > > >
> > > > You might need to recalculate the point size needed by calling
> > > > getTextExtent() for a given piece of text and seeing how many actual
> > pixel
> > > > it takes up. Then adjusting the point size via setFont() until the
text
> > > fits
> > > > into the control area.
> > > >
> > > > Alternately, make the controls a few pixels bigger than the minimum
> > > needed.
> > > >
> > > > ----- Original Message -----
> > > > From: "joshua goldberg" <futures8 at bellsouth.net>
> > > > To: "EUforum" <EUforum at topica.com>
> > > > Sent: Friday, August 24, 2001 3:08 PM
> > > > Subject: [WIN] screen resolution problem
> > > >
> > > >
> > > > >
> > > > > Hi, all.
> > > > >
> > > > > I've developed a program which call Win32Lib routines. Works and
looks
> > > > fine on the machine on which it was devloped (19 inch monitor; set
to
> > > > 1024/768 resolution).
> > > > > when the  program is moved to a system (also Win 98) with a 14
inch
> > > > monitor set to 648/480, the type face appears to be quite a bit
larger,
> > > even
> > > > overrunning the
> > > > > boundaries of the PushBttons and the Lists in which data is
displayed.
> > > The
> > > > text on various screens is also no longer properly centered.
> > > > >
> > > > > Does anyone have any suggestions to avoid this? Any suggestions
> > > > appreciated.
> > > > >
> > > > > Thanks.
> > > > >
> > > > > Josh
> > > > >
> > > > >
> > > > >
>
>

new topic     » goto parent     » topic index » view message » categorize

6. Re: [WIN] screen resolution problem

eh, look in the SDK for textmetrics struct...
this will give you more info than you should ever need....

Euman
euman at bellsouth.net

> Derek, how do you get the screen pixel dimensions?
> 
> 
> ...george

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu