Thread View: comp.lang.pascal.delphi.misc
3 messages
3 total messages
Started by S.R. Heller
Sun, 23 Jan 2000 00:00
Getting text from an unknown control
Author: S.R. Heller
Date: Sun, 23 Jan 2000 00:00
Date: Sun, 23 Jan 2000 00:00
22 lines
1839 bytes
1839 bytes
I'm trying to get text from the 'Message List Pane' of the Forte Agent newsreader (specifically the Subject of a given message in the list: my idea is to iterate through the messages in the list, grabbing the subject from each). I've got a handle to the window, which is described by WinSight as 'OwlWindow' (class) and 'ListBrowser' (window title). It appears to be a ListView. I can successfully send WM_X messages to set the focus or send keystrokes, but LVM messsages all fail. ListView_GetItemCount(Hwnd) always returns '0' no matter how many messages are in the list. Sending the message LVM_GETCOLUMNWIDTH always returns '1', no matter the width of the columns, and though it should return '0' for a failure. I also tried various LB messages. I'd say the root of the problem is that I don't know what the heck this window is. It looks like a ListView, but I'm wondering if it is some sort of custom control cooked up with OWL, in which case -- what can I do? Setting aside the problems of getting data out of someone else's application, which I think I understand, is there any way to get strings out of a windowed control, without knowing or apparently being able to determine what type of control it is? Steve H.
Re: Getting text from an unknown control
Author: Mab
Date: Mon, 24 Jan 2000 00:00
Date: Mon, 24 Jan 2000 00:00
14 lines
1214 bytes
1214 bytes
In article <86gnu3$bpr$0@dosa.alt.net>, srheller@oz.net wrote: (snip) > >Setting aside the problems of getting data out of someone else's >application, which I think I understand, is there any way to get strings out >of a windowed control, without knowing or apparently being able to determine >what type of control it is? > >Steve H. > I think the API function is called "GetWindowText" - it takes an HWND, so you don't need to know what kind of control you're getting the text from. Mab
Re: Getting text from an unknown control
Author: Dave Parsons
Date: Mon, 24 Jan 2000 00:00
Date: Mon, 24 Jan 2000 00:00
42 lines
2473 bytes
2473 bytes
If it were just a normal window, as opposed to a list, I believe you'd be able to read the text using the GetWindowText API. I have been able to use tha in the past without any trouble, although not with list controls. Good luck!! -- David G. Parsons URL: http://www.DrDelphi.com Email: DrDelphi@DrDelphi.com Voicemail/Fax: (603) 947-8207 S.R. Heller <srheller@oz.net> wrote in message news:86gnu3$bpr$0@dosa.alt.net... > I'm trying to get text from the 'Message List Pane' of the Forte Agent > newsreader (specifically the Subject of a given message in the list: my idea > is to iterate through the messages in the list, grabbing the subject from > each). I've got a handle to the window, which is described by WinSight as > 'OwlWindow' (class) and 'ListBrowser' (window title). It appears to be a > ListView. > > I can successfully send WM_X messages to set the focus or send keystrokes, > but LVM messsages all fail. ListView_GetItemCount(Hwnd) always returns '0' > no matter how many messages are in the list. Sending the message > LVM_GETCOLUMNWIDTH always returns '1', no matter the width of the columns, > and though it should return '0' for a failure. I also tried various LB > messages. I'd say the root of the problem is that I don't know what the heck > this window is. It looks like a ListView, but I'm wondering if it is some > sort of custom control cooked up with OWL, in which case -- what can I do? > > Setting aside the problems of getting data out of someone else's > application, which I think I understand, is there any way to get strings out > of a windowed control, without knowing or apparently being able to determine > what type of control it is? > > Steve H. >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads