🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #9860

Re: hWnd to hDC

#9860
From: Bob Gonder
Date: Fri, 11 Jun 2004 15:53
7 lines
1182 bytes
JD wrote:

>Given the hWnd of a window, how can I get an hDC to it so that
>I can measure the width of a string using GetTextExtentPoint32?

Usually done during WM_PAINT
      hDC = BeginPaint(hWnd, &Ps);
Technical Details
Message-ID: <f9ljc0tontmam8721pirl44umvoj7gmhqj@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40c9ccbd$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,819ce6f771e7e634
X-Google-Attributes: gid10cc67,public
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: hWnd to hDC
Date: Fri, 11 Jun 2004 08:53:07 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <f9ljc0tontmam8721pirl44umvoj7gmhqj@4ax.com>
References: <40c9ccbd$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 65.173.66.53
X-Trace: newsgroups.borland.com 1086969185 65.173.66.53 (11 Jun 2004 08:53:05 -0700)
Lines: 9
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail