RE: Win32lib additions [3]

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

> From: euman at bellsouth.net [mailto:euman at bellsouth.net]

> I'll just continue to make the change to Win32lib on my own and for
> those who want to gain a bit of speed set window_handle as global
> so you can use the [internal] Win32lib sequence like this:
> 
> ListLV = create(ListView, "",hWnd, x1, y1,x2, y2, flags)
> hListLV = window_handle[ListLV] 
> --later when messages are needed to be sent
> VOID = w32Func( xSendMessage, {hListLV, etc..etc
> 
> instead of having to process hundreds of lines in Win32lib 
> trying to send a simple message.

Derek pointed out that all you'd have to do is this:

VOID = getControlInfo( ListLV, {CONTROLINFO_handle})
hListLV = lValues[1]

There seems to be very little overhead compared with...

hListLV = window_handle[ListLV]

...especially since it's only incurred one time, when you create the
control.  You'd have to do this thousands of times in order to notice any
difference, and if you have that many controls, you should probably rethink
whatever it is you're writing.  

On a related note, if you're really trying to squeeze speed out of your
code, you should use c_func directly, rather than w32Func and avoid some
extra overhead, at least if you're sending lots of messages.  The w32Func
apparatus was created to avoid loading extra libraries and routines that
were never used.  OTOH, if you only send the occaisional message, it
probably won't make a difference anyways.

Matt Lewis

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

Search



Quick Links

User menu

Not signed in.

Misc Menu