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

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -