🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Getting text from within a window

#5498
From: Jeff
Date: Wed, 10 Aug 2005 16:35
12 lines
1234 bytes
I'm trying to get static text that is in a window. I've got a handle to the 
window, but every thing I've tried (i.e. GetWindowText(), WM_GETTEXT) has 
only retrieved the caption. How can I retrieve the text of a label within 
the window?

Here's a code snippet from my last attempt:

SendMessage(hWindow, WM_GETTEXT, GetWindowTextLength(hWindow) + 1, 
(LPARAM)ptr_chrTitle);

Please help,
Jeff 
Technical Details
Message-ID: <42fa2cc5@newsgroups.borland.com>
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

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,148e8a2231e7af2d,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jeff" <Jeff@nospam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Getting text from within a window
Date: Wed, 10 Aug 2005 10:35:17 -0600
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
NNTP-Posting-Host: 198.68.195.202
Message-ID: <42fa2cc5@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1123691717 198.68.195.202 (10 Aug 2005 09:35:17 -0700)
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