RE: [WIN] screen resolution problem
- Posted by Brian Broker <bkb at cnw.com> Aug 24, 2001
- 461 views
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 > > > > > > > > > > > > > > > > > > > >