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

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -