I don't know, it's not like two people already explained it in this thread before.
Well as I said, there are two things you need.
1. You need a function to call your DBP function and clean up after it. You then set this function as the callback.
2. You need a version of
call function ptr that doesn't clean up after calling the old function (as the old window procedure will clean up after itself already). This assumes it doesn't cleverly check and adjust the stack after calling the function.
Let me briefly explain what's going on here.
When a cdecl function is called (standard C/C++ functions, DBP functions, etc) the caller pushes the parameters onto the stack, and then calls the function. After the function returns, the caller then removes these parameters from the stack.
When a stdcall function is called (Win API functions are all stdcall) operation is similar except it is the
callee (the function) that removes the parameters from the stack, rather than the caller. Obviously if you have both the caller and callee remove the parameters, you'll end up removing twice as much data from the stack, half of which belongs to another function. Likewise, if you don't remove the parameters from the stack at all you may confuse functions higher up the calling chain that will think this data is theirs.