Article View: borland.public.cppbuilder.nativeapi
Article #7690Re: Pixel to inch
From: Bob Gonder
Date: Sat, 08 Jan 2005 19:20
Date: Sat, 08 Jan 2005 19:20
18 lines
1597 bytes
1597 bytes
Thomas J. wrote: >I want to print a bar code but unfortunately the barcode API works with >οΏ½nch or millimetre. >How can calculate from pixel to inch or millimetre? > >Thanks for your help See GetDeviceCaps() With the HORZRES and the HORZSIZE (or the Vert versions) HORZSIZE = page width in mm. HORZRES = page width in pixels. mm = GetDeviceCaps( hPrinter,HORZSIZE); pix = GetDeviceCaps( hPrinter,HORZRES); pixpermm = pix / mm; pixperinch = (pix * 254) / (mm*10);
Technical Details
Message-ID:
<eqb0u0la4rgijo4jp5ck73ilm55qlojhkp@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.zanker.org!feeder1.cambrium.nl!feed.tweaknews.nl!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41e00c05$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7456e13c12db9bc0 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Pixel to inch Date: Sat, 08 Jan 2005 11:20:20 -0800 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <eqb0u0la4rgijo4jp5ck73ilm55qlojhkp@4ax.com> References: <41e00c05$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 69.69.90.67 X-Trace: newsgroups.borland.com 1105212019 69.69.90.67 (8 Jan 2005 11:20:19 -0800) Lines: 19 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.zanker.org!feeder1.cambrium.nl!feed.tweaknews.nl!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail