delphi - How i can cast a WNDPROC to a TWndMethod -
how can cast wndproc twndmethod
so far try give me invalid typecast error.
twndmethod(pointer(getwindowlong(fhandle, gwl_wndproc)));
if want subclass window handle (using setwindowlong) process window messages in twndmethod function, should not cast value returned getwindowlong(fhandle, gwl_wndproc) twndmethod. should use makeobjectinstance function obtain value can passed setwindowlong instead. read sertac akuyz answer general idea.
note need subclass window handle rare in delphi applications. delphi provides several other ways interfere window message processing, more simple , safe.
Comments
Post a Comment