Article View: borland.public.cppbuilder.nativeapi
Article #9857Re: hWnd to hDC
From: Bruce Salzman
Date: Fri, 11 Jun 2004 15:35
Date: Fri, 11 Jun 2004 15:35
8 lines
1082 bytes
1082 bytes
> 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? hDC = ::GetWindowDC(hWnd); // get's DC of entire window hDC = ::GetDC(hWnd); // get's of client area Regards, Bruce
Technical Details
Message-ID:
<40c9d15a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<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: " Bruce Salzman" <bruce@nospam.org> Newsgroups: borland.public.cppbuilder.nativeapi References: <40c9ccbd$1@newsgroups.borland.com> Subject: Re: hWnd to hDC Date: Fri, 11 Jun 2004 10:35:55 -0500 Lines: 10 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 24.94.231.89 Message-ID: <40c9d15a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1086968154 24.94.231.89 (11 Jun 2004 08:35:54 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail