Article View: borland.public.cppbuilder.nativeapi
Article #4047Length of text in MessageBox function
From: Richard Casten
Date: Thu, 23 Mar 2006 17:04
Date: Thu, 23 Mar 2006 17:04
10 lines
1396 bytes
1396 bytes
I am going to be displaying an error message using the MessageBox function. As part of displaying the error message, I want to place an asterisk under the offending character. If I could find the length of any string in the font that is being used in the message box, I could figure out what the character position of the asterisk needs to be. It looks like the function GetTextExtentPoint32 would be the function to call, but I need to supply it a device context. How would I get the device context given that I am using the MessageBox function to display the text?
Technical Details
Message-ID:
<4422D533.32E31292@aero.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,b8d4aea1a094904b,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Message-ID: <4422D533.32E31292@aero.org> Date: Thu, 23 Mar 2006 09:04:51 -0800 From: Richard Casten <richard.casten@aero.org> X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Length of text in MessageBox function Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 130.221.27.185 X-Trace: newsgroups.borland.com 1143133395 130.221.27.185 (23 Mar 2006 09:03:15 -0700) Lines: 11 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail