Article View: comp.os.ms-windows.programmer.misc
Article #1994Re: Logical Units to pixel conversion?
From: M.L.M.Veraart
Date: Thu, 17 Dec 1992 16:17
Date: Thu, 17 Dec 1992 16:17
20 lines
1206 bytes
1206 bytes
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
Technical Details
Message-ID:
<1992Dec17.161705.15315@fel.tno.nl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!tnofel!felfs!rioj7References:
<1992Dec7.173424.1@cortex>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!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