Article View: borland.public.cppbuilder.nativeapi
Article #9879Re: GetTextExtentPoint32
From: Alan Bellingham
Date: Fri, 11 Jun 2004 22:41
Date: Fri, 11 Jun 2004 22:41
22 lines
1818 bytes
1818 bytes
"JD" <nospam@nospam.com> wrote: >I have the hWnd to the BrowseForFolder dialog and using either >GetWindowDC or GetDC I get the same result. I've been able to >determine that GetTextExtentPoint32 is giving me the width if >it were the dialog caption - not text in the client area. GetTextExtentPoint32() will give you the width that it would take up if you were to print it immediately afterwards. In other words, as per the font currently in effect. If you're relying on the dialog drawing itself (as in a static text or something) to do it, you'll need to work out what the font used is. Ah, remember that the dialog may well have a different font from the font assigned to any of the controls on it. Alan Bellingham -- Me <url:mailto:alanb@episys.com> <url:http://www.doughnut.demon.co.uk/> ACCU - C, C++ and Java programming <url:http://accu.org/> The 2004 Discworld Convention <url:http://dwcon.org/>
Technical Details
Message-ID:
<n3dkc0d02r2u4da7ogbiilasdi4t43tbno@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!t-online.de!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<40ca2cbe$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,e169022c7b789c9d X-Google-Attributes: gid10cc67,public From: Alan Bellingham <alanb@episys.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: GetTextExtentPoint32 Date: Fri, 11 Jun 2004 23:41:36 +0100 Reply-To: alanb@episys.com Message-ID: <n3dkc0d02r2u4da7ogbiilasdi4t43tbno@4ax.com> References: <40ca2cbe$1@newsgroups.borland.com> X-Newsreader: Forte Agent 2.0/32.646 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 62.49.31.105 X-Trace: newsgroups.borland.com 1086993694 62.49.31.105 (11 Jun 2004 15:41:34 -0700) Lines: 22 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!t-online.de!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail