Article View: borland.public.cppbuilder.nativeapi
Article #9730Re: GetTextExtentPoint32
From: JD
Date: Sat, 12 Jun 2004 02:07
Date: Sat, 12 Jun 2004 02:07
26 lines
1704 bytes
1704 bytes
Alan Bellingham <alanb@episys.com> wrote: > 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. I tried GetTextExtentPoint32 right after I set the text but got the same result. > 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. FWIW, I used EnumChildWindows and found that GetClassName showed the target contol class name was "Static". What's the impact? > Ah, remember that the dialog may well have a different font > from the font assigned to any of the controls on it. I located the HWND of the target control and then tried both GetWindowDC and GetDC using that HWND but I got the same results as before. What would you do? ~ JD
Technical Details
Message-ID:
<40ca656d$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news-in.ntli.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40ca2cbe$1@newsgroups.borland.com> <n3dkc0d02r2u4da7ogbiilasdi4t43tbno@4ax.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: "JD" <nospam@nospam.com> Sender: "JD" <nospam@nospam.com> Reply-To: "JD" <nospam@nospam.com> Subject: Re: GetTextExtentPoint32 Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 172.200.213.52 References: <40ca2cbe$1@newsgroups.borland.com> <n3dkc0d02r2u4da7ogbiilasdi4t43tbno@4ax.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <40ca656d$1@newsgroups.borland.com> Date: 11 Jun 2004 19:07:41 -0700 X-Trace: newsgroups.borland.com 1087006061 207.105.83.66 (11 Jun 2004 19:07:41 -0700) Lines: 27 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news-in.ntli.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail