[comp.windows.ms.programmer] Re^2: Good hash function on window handle?

kend@data.UUCP (Ken Dickey) (05/14/91)

al@well.sf.ca.us (Alfred Fontes) writes:

>kend@data.UUCP (Ken Dickey) writes:

>>[i.e. use the cbWndExtra bytes and {Set,Get}WindowLong() to
>>save/restore an index or data handle.  Then use the window handle
>>itself to get to your info.]

>This is a good idea, but it won't work for pre-registered classes,
>such as controls and the MDI client window.


I don't know your app or how many windows you are dealing with, but
note that for small tables (e.g. N < 100) linear search beats hashing.


-Ken Dickey