What is the difference between WindowProc
and CallWindowProc
?
I can imagine when registering a new window class I can specify my own WindowProc for it.
This leaves the question: When and what for do I use CallWindowProc ?
When you subclass a window using SetWindowLong/Ptr(GWL_WNDPROC)
to assign a new WindowProc()
to the window, the replacement WindowProc()
uses CallWindowProc()
when it needs to call the window's original WindowProc()
:
The preferred way to subclass a window is to use SetWindowSubClass()
instead: