RE: Difference Between a Control ID and a Win32 Handle

new topic     » topic index » view thread      » older message » newer message

Ron,

I'll take a stab at this...Derek, correct me if I'm wrong.

A control ID returned from the create() routine is basically an index to 
a sequence of hWnds stored internally in win32lib.  Each time you issue 
a create() the hWnd returned from the createEx() Windows API is appended 
to the end of the list and you are given that index number.

Why, you may ask? It's faster within win32lib to refer to a sequence 
index than to try and find the hWnd in a sequence of hWnds.  

HTH,

Jonas
Ron Tarrant wrote:
> Hi all,
> 
> I'm trying to find out what the difference is between a control
> ID (that's returned by the create() routine) and a handle
> (as in HWnd).
> 
> I'm assuming they aren't the same thing because in a call such as:
> 
> w32Proc(ScrollWindow, {getHandle(myWindow), HChange, 0, 0, 0})
> 
> where myWindow is the control ID, it's passed to the getHandle()
> routine to get the handle needed by ScrollWindow(). To me, this
> implies that we're dealing with two separate entities.
> 
> Also, browsing through the docs for win32lib's getControlInfo()
> routine, I don't see any mention of an lValue for the control ID
> of the control about which I'm seeking information. Does anyone know
> if there's a way to use getControlInfo() to get the control ID?
> I'm using it in a while loop to find the top-level window in
> which a control is located, so I don't think getSelf() will work
> in this case.
> 
> Thanks!
> 
> -Ron T.
> 
>

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu