home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / mswindo / programm / misc / 4319 < prev    next >
Encoding:
Text File  |  1992-12-18  |  1.1 KB  |  31 lines

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