Article View: comp.os.ms-windows.programmer.misc
Article #2534how does Windows know the physical dimensions of my monitor!?!?!
From: John Grant
Date: Thu, 07 Jan 1993 00:16
Date: Thu, 07 Jan 1993 00:16
37 lines
1972 bytes
1972 bytes
The docs say that the following:
xsize=GetDeviceCaps(hdc,HORZSIZE);
ysize=GetDeviceCaps(hdc,VERTSIZE);
returns the dimensions of the physical display (mm).
How does it know these values for monitors????
First of all, who am I talking to when I call GetDeviceCaps?
The display driver? Windows?
If I am talking to the display driver, does it return these values by:
1. looking them up from a table in the driver
2. asking the graphics card for the values
3. computing them from the resolution of the card and the
size of a single pixel. If so, does it get the size of
the pixel from:
(a) a table in the driver
(b) asking the graphics card for the values
I have a VGA Wonder and a NEC 3D. When I use ATI's VSETUP program, I
can tell it that I have a NEC 3D. Presumably VSETUP has a table of monitor
dimensions and sets that in the card's config table. The Windows driver
can then ask the *card* how big the monitor is. But what if I hook up
another monitor that VSETUP doesn't know about? What then?
The size is returned correctly on my system, but
the values returned on a NEC 6G (*huge beast*) are incorrect (smaller
than they should be). That system is running a #9 24-bit card
in 1280 X 1024 resolution. When it was set up, there was no way to
tell the card which monitor was being used.
I would appreciate it if somone who knows driver internals could
poke around in the DDK for an answer.
--
John A. Grant jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
Technical Details
Message-ID:
<1993Jan7.001644.7600@emr1.emr.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!nott!emr1!jagrantShow Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!nott!emr1!jagrant From: jagrant@emr1.emr.ca (John Grant) Subject: how does Windows know the physical dimensions of my monitor!?!?! Message-ID: <1993Jan7.001644.7600@emr1.emr.ca> Organization: Energy, Mines, and Resources, Ottawa Date: Thu, 7 Jan 1993 00:16:44 GMT Lines: 37