On 3/14/07, Vincent Snijders <[EMAIL PROTECTED]> wrote:
IMHO Self.SetWindowLong is not so nice looking, SetWindowLong looks better.
Ummm ... I don´t agree. There is also Windows.SetWindowLong. By
specifying where the function comes from, I avoid having to think
about which of the 2 the compiler will choose.
To be on the safe side, I would always call SetWindowLong for GWL_USERDATA, if
the
method is nil, you can decide if you want to set it to 0 (nil) or to PMethod
pointer
referencing a nil method.
The default value, acording to MSDN, is nil, for a newly created
window. Althougth I agree it´s a little safer to specify this, it
shouldn´t be needed, if windows follows the docs (and in my tests it
did).
I think it is better to use an atom or setprop (like for WindowInfo). Maybe the
user
of AllocateHWnd wants to use the userdata for himself.
ummm ... I don´t know how to use atoms, or setprop....
thanks,
--
Felipe Monteiro de Carvalho
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives