home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!mcsun!sun4nl!tnofel!felfs!rioj7
- From: rioj7@fel.tno.nl (M.L.M.Veraart)
- Subject: Re: Logical Units to pixel conversion?
- Organization: TNO Physics and Electronics Laboratory
- Date: Thu, 17 Dec 92 16:17:05 GMT
- Message-ID: <1992Dec17.161705.15315@fel.tno.nl>
- References: <1992Dec7.173424.1@cortex>
- Lines: 20
-
- mboucher@cortex.prospect.com (Mike Boucher) writes:
-
- >Hey there,
-
- >Anyone know a good way to convert from Logical Units to pixels?
- >I've got a list box which I want to horizontally scroll, and the LOGFONT
- >structure gives me the width of a char in logical units, but the rect that
- >gives me the size of the list box is in pixels...
-
- There are two window procedures called LPtoDP() and DPtoLP().
- You must call them with right settings of the device context
- (the mapping mode). Where DP are the Device Points (pixels) and
- LP are the logical points.
-
- Mario
- --
- Mario Veraart TNO Physics and Electronics Laboratory
- email: rioj7@fel.tno.nl The Hague The Netherlands
- "If all else fails, show pretty pictures and animated videos,
- and don't talk about performance", David Bailey
-