winapi - Mouse hooking callback not called? -
i'm trying hook mouse this:
#include <windows.h> #include <stdio.h> hhook mousehook; lresult winapi mousehookproc(int ncode, wparam wparam, lparam lparam) { messagebox(0, "not called :-(", "m", 0); return callnexthookex(mousehook, ncode, wparam, lparam); } int main() { mousehook = setwindowshookex(wh_mouse, (hookproc)mousehookproc, getmodulehandle(null), 0); printf("press enter exit.\n"); getchar(); return 0; }
but messagebox never appears. think everything's ok, seems there's wrong.
thanks in advance.
Comments
Post a Comment