Well i am sorry but i am trying to add a hook using SetWindowsHookEx
so here is what i have
Myproc:
and my functionCode:LRESULT CALLBACK ChookDlg::MyPrc(int nCode,WPARAM wParam,LPARAM lParam){//...}
when i try to compile it gives me an errorCode:g_hHook=SetWindowsHookEx(WH_GETMESSAGE,(HOOKPROC)&ChookDlg::MyPrc,NULL,dwID);
error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'HOOKPROC'
None of the functions with this name in scope match the target type
I don't know what to do
Hmm i saw somewhere that it needs to be static but i need to use some variables of this ChookDlg and i can't(





Reply With Quote