SetWindowHookEx parameter wrong 
Author Message
 SetWindowHookEx parameter wrong

Hi,
    The following call to SetWindowHookEx says that the function call in
parameter number 2 is somehow wrong.  Does anyone see what is wrong?

hMsgBoxHook = SetWindowsHookEx(WH_CBT, CBTProc, NULL,
GetCurrentThreadId());

LRESULT CJoDlg::CBTProc(int nCode, WPARAM wParam, LPARAM lParam)
{
    ...

Quote:
}

'SetWindowsHookExA' : cannot convert parameter 2 from 'long
(int,unsigned int,long)' to 'long (__stdcall *)(int,unsigned int,long)'
        None of the functions with this name in scope match the target
type

Thanks,
            Will



Sun, 20 Feb 2005 02:14:05 GMT  
 SetWindowHookEx parameter wrong
    Try changing your CJoDlg::CBTProc(..),  a 'static' function.

--
Cheers
Check Abdoul
----------------


Quote:
> Hi,
>     The following call to SetWindowHookEx says that the function call in
> parameter number 2 is somehow wrong.  Does anyone see what is wrong?

> hMsgBoxHook = SetWindowsHookEx(WH_CBT, CBTProc, NULL,
> GetCurrentThreadId());

> LRESULT CJoDlg::CBTProc(int nCode, WPARAM wParam, LPARAM lParam)
> {
>     ...
> }

> 'SetWindowsHookExA' : cannot convert parameter 2 from 'long
> (int,unsigned int,long)' to 'long (__stdcall *)(int,unsigned int,long)'
>         None of the functions with this name in scope match the target
> type

> Thanks,
>             Will



Sun, 20 Feb 2005 02:33:34 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. SetWindowHookEx()

2. wrong parameters given to main(char**, int) ?!?

3. Bug: Wrong parsing of Cmd Line parameters

4. Implementing the Shell interfaces - wrong parameter types in stubs

5. getting wrong values in the function parameters

6. Parameter info for CreateWindow() is wrong

7. SQL Parameters, what am i doing wrong?

8. Am I wrong or the compiler is wrong?

9. Am I wrong or compiler is wrong?

10. VC7 does NOT support template-template parameters involving non-type parameters

11. function parameters: default value, optional parameter

12. pCmd->Parameters->Count fails when there's no parameter

 

 
Powered by phpBB® Forum Software