Control Identity

G

Guest

Hello,

I'm scraping the screen of an unmanaged app using FindWindow and
EnumChildWindows API calls. Does anyone know of a way to uniquely identify
the controls that EnumChildWindows returns? Window handles change and the
controls I'm iterating through don't have tab stops. Screen scraping is
useless unless we can constantly identify which controls are returning data.

Thanks,
John F.
 
N

Nicholas Paldino [.NET/C# MVP]

John,

There really is no way for a control to say "this is what makes me
unique". You could check the types of the controls (the window class) from
the handle, but that's about it. You would have to compare properties of
the individual controls to see what exactly they are doing.

Hope this helps.
 
G

Guest

Thanks Nicholas. I'm finding that no matter what I try there are no special
identifiers. I will study the properties to see if I can pin them down.
Currently I'm sorting on their relative X,Y coordinates and it works most of
the time. So close...

Thanks...
--
John F


Nicholas Paldino said:
John,

There really is no way for a control to say "this is what makes me
unique". You could check the types of the controls (the window class) from
the handle, but that's about it. You would have to compare properties of
the individual controls to see what exactly they are doing.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

John F said:
Hello,

I'm scraping the screen of an unmanaged app using FindWindow and
EnumChildWindows API calls. Does anyone know of a way to uniquely
identify
the controls that EnumChildWindows returns? Window handles change and the
controls I'm iterating through don't have tab stops. Screen scraping is
useless unless we can constantly identify which controls are returning
data.

Thanks,
John F.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top