URGENT! Are all control id's unique ? 
Author Message
 URGENT! Are all control id's unique ?

I get the ID of a control on a third party window using the
GetWindowLong(hwnd,GWL_ID) function.
The problem is that I often get a case where different controls have the
same ID. The particular case I need to apply this is on what looks like a
grid control but if I examine the class of the control using GetClassName()
it returns "edit". Which wuold mean that the app has a bunch of text boxes
joined together to look like a grid. the problem is that they all return the
ID of 65535.
Next down the line I have a simple label, i thought, but it's GetClassName
returns "BorDlg_Gray". This control's ID returns as 0, GetLastError also
returns 0, which implies no error. Am I doing something wrong or is this the
way windows works ? I need a 100% reliable way to make sure that I will
allways be able to access a control on some window on some third party
application, therefore I require some unique way of identifying them.

Pleeeese help me, I am so desperate.

--
Thanks

Erik

---
Telekinesys
http://www.*-*-*.com/
Creators of web based business solutions.

Erik de Kok
Telephone: +27 (0)11 6548820
Direct: +27 (0)11 6548840
Cell: +27 (0)82 4956304



Sun, 01 Apr 2001 03:00:00 GMT  
 URGENT! Are all control id's unique ?
I believe control ID's need to be unique only within a single window.
You might have to examine the text in each control as a unique way
of identifying them, if information about the parent window isn't
enough for you.

Chris

Quote:

> I get the ID of a control on a third party window using the
> GetWindowLong(hwnd,GWL_ID) function.
> The problem is that I often get a case where different controls have the
> same ID. The particular case I need to apply this is on what looks like a
> grid control but if I examine the class of the control using GetClassName()



Mon, 02 Apr 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. create unique id's

2. Unique control ID generator

3. URGENT! Are all control id's unique ?

4. size limit in list-sort-unique or am I messed up

5. Unique ID (uuid)

6. How to generate a machine unique ID

7. Unique ID of a PC ?

8. How to get a Unique ID of a PC

9. unique ID

10. Need Unique Id generation.

11. unique id for a string

12. How to get a unique connection id?

 

 
Powered by phpBB® Forum Software