Article View: borland.public.cppbuilder.nativeapi
Article #14369Re: String Width and Height in pixels for any given Font
From: Remy Lebeau (TeamB)
Date: Mon, 18 Aug 2003 17:28
Date: Mon, 18 Aug 2003 17:28
19 lines
1621 bytes
1621 bytes
"Rodolfo Frino" <rodolfofrino@yahoo.com> wrote in message news:3f40405c@newsgroups.borland.com... > Does anyone know how to obtain the text width > and height in pixels, accurately, using API's? Look at the GetTextExtentPoint32() function. You need to obtain a valid HDC first, since font sizes are dependant on the particular device that the string will actually be rendered to. Different devices can have different font settings applied to them. Gambit --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 8/14/03
Technical Details
Message-ID:
<3f410b2e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!sn-xit-09!supernews.com!news-out.visi.com!petbe.visi.com!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3f40405c@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,4b951b439ffe2bcb X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-18 10:38:59 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f40405c@newsgroups.borland.com> Subject: Re: String Width and Height in pixels for any given Font Date: Mon, 18 Aug 2003 10:28:37 -0700 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3f410b2e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1061227310 207.175.226.26 (18 Aug 2003 10:21:50 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!sn-xit-09!supernews.com!news-out.visi.com!petbe.visi.com!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail