|
|
|
date: Sat, 23 Feb 2008 14:43:00 -0800,
group: microsoft.public.platformsdk.gdi
back
Re: size of computer screen in inches
Thank you, Mark
Is there a way to get what the driver reports?
I do not need a accurate value but only to to adjust the figure approximately
so it will not be terribly out of shape.
I keep thinking that this information must reside somewhere in the computer.
Would you tell me how I can get the driver reports?
Thank you again, Mark
SpottyThe Dog
Mark
"Mark Salsbery [MVP]" wrote:
> "ChangChiTheGraphics" wrote
> in message news:A751C880-08D2-401D-B9A2-1E13BF934E3C@microsoft.com...
> >
> > I need to draw a rectangle whose actual size( in inches) does not change
> > when a size of computer screen( in inches) is changed to a different
> > size(
> > in inches).
> >
> > I used the following API:
> > GetDeviceCaps(hIC,LOGPIXELSX) gives pixels/inch, and
> > GetDeviceCaps(hIC,HORZRES) gives number of pixels
> >
> > But it does not lead to the true dimension of the computer screen when I
> > use
> > above parameters.
> >
> > In fact, pixels/inch stays the same for the same number of pixels even
> > when
> > a different screen with different size is used.
> >
> > Is there a way to get the size( in inches) of the computer screen.
>
>
> There's no reliable way. You can only get what the driver reports. Even
> then, CRT view area can be stretched/compressed with the controls on the
> monitor, and unless there was a way for the monitor to report those
> settings, there's no way to get accurate values.
>
> Mark
>
> --
> Mark Salsbery
> Microsoft MVP - Visual C++
>
>
> >
> > I use C language on XP computer and use APIs with Visual C++ compiler.
> >
> > Thank you
> >
> > SpottyThe Dog
> >
date: Mon, 25 Feb 2008 11:05:01 -0800
author: ChangChiTheGraphics
Re: size of computer screen in inches
"ChangChiTheGraphics" wrote
in message news:39D31F1D-2A90-4101-9313-6879A718C384@microsoft.com...
> Thank you, Mark
>
> Is there a way to get what the driver reports?
That's what you're getting from GetDeviceCaps()....the problem is, the info
isn't always reliable, as you've seen.
For example, the default VGA monitor driver can't possibly return an
accurate pixels-per-inch value.
Mark
--
Mark Salsbery
Microsoft MVP - Visual C++
>
> I do not need a accurate value but only to to adjust the figure
> approximately
> so it will not be terribly out of shape.
>
> I keep thinking that this information must reside somewhere in the
> computer.
> Would you tell me how I can get the driver reports?
> Thank you again, Mark
> SpottyThe Dog
>
> Mark
>
> "Mark Salsbery [MVP]" wrote:
>
>> "ChangChiTheGraphics"
>> wrote
>> in message news:A751C880-08D2-401D-B9A2-1E13BF934E3C@microsoft.com...
>> >
>> > I need to draw a rectangle whose actual size( in inches) does not
>> > change
>> > when a size of computer screen( in inches) is changed to a different
>> > size(
>> > in inches).
>> >
>> > I used the following API:
>> > GetDeviceCaps(hIC,LOGPIXELSX) gives pixels/inch, and
>> > GetDeviceCaps(hIC,HORZRES) gives number of pixels
>> >
>> > But it does not lead to the true dimension of the computer screen when
>> > I
>> > use
>> > above parameters.
>> >
>> > In fact, pixels/inch stays the same for the same number of pixels even
>> > when
>> > a different screen with different size is used.
>> >
>> > Is there a way to get the size( in inches) of the computer screen.
>>
>>
>> There's no reliable way. You can only get what the driver reports. Even
>> then, CRT view area can be stretched/compressed with the controls on the
>> monitor, and unless there was a way for the monitor to report those
>> settings, there's no way to get accurate values.
>>
>> Mark
>>
>> --
>> Mark Salsbery
>> Microsoft MVP - Visual C++
>>
>>
>> >
>> > I use C language on XP computer and use APIs with Visual C++ compiler.
>> >
>> > Thank you
>> >
>> > SpottyThe Dog
>> >
date: Mon, 25 Feb 2008 12:22:55 -0800
author: Mark Salsbery [MVP] MarkSalsbery[MVP]@newsgroup.nospam
|
|