Nonso Nosiri
2021-12-13 04:31:45 UTC
Hi,
I am using a hook with the WH_CALLWNDPROCRET flag to intercept a hwnd's procedure messages and intercept WM_INPUT and WM_PAINT, but I am having problems with it.
I cast the LPARAM to a CWPRETSTRUCT pointer according to msdn: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nc-winuser-hookproc
But unfortunately, the "message" member in the struct is not used the same way as in a normal procedure callback function: https://docs.microsoft.com/en-us/windows/win32/winmsg/using-window-procedures
It's either that or it is garbage data.
Am I using it wrong? would you mind creating a small code example that could help me? Or pointing out my errors, I would really appreciate it.
This is the code I'm using: https://pastebin.com/DNZhUP4m
Thanks in advance,
Chinomso Nosiri.
I am using a hook with the WH_CALLWNDPROCRET flag to intercept a hwnd's procedure messages and intercept WM_INPUT and WM_PAINT, but I am having problems with it.
I cast the LPARAM to a CWPRETSTRUCT pointer according to msdn: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nc-winuser-hookproc
But unfortunately, the "message" member in the struct is not used the same way as in a normal procedure callback function: https://docs.microsoft.com/en-us/windows/win32/winmsg/using-window-procedures
It's either that or it is garbage data.
Am I using it wrong? would you mind creating a small code example that could help me? Or pointing out my errors, I would really appreciate it.
This is the code I'm using: https://pastebin.com/DNZhUP4m
Thanks in advance,
Chinomso Nosiri.