• Welcome to Valhalla Legends Archive.
 

Getting the handle

Started by Networks, August 01, 2005, 03:18 PM

Previous topic - Next topic

Networks

Does anyone know how to get the handle of a label, I am assuming this is through API since the label in VB6 doesn't hold the property for you to directly access. Thank you in advance.

UserLoser.


Grok

UserLoser is correct.  Networks if you are getting the handle using the ID, you can get the ID by running Spy++.  If the dialog is dynamically created, you will need to iterate the dialog items and decide which is correct by examining its properties.  I've never had to do that, every application dialog I've needed to access has been a resource, or the order of build is consistent so that the ID doesn't change.

Networks

I am not sure if the ID is:

nIDDlgItem
    [in] Specifies the identifier of the control to be retrieved.

but I don't know what exactly this is or how to get it.

Grok

Running Spy++ you can view the contents of a dialog window such as this:



Hmm well nevermind this is a bad example because it's VB.  You're probably working with non-VB created dialogs.