i am still lack of information about parameter that we must send to function : SetWindowsHookEx proto HookType:DWORD, pHookProc:DWORD, hInstance:DWORD, ThreadID:DWORD 1. if HookType is WH_KEYBOARD what must we do in our pHookProc ? (i have searched that in win32 api reference but i guess it was hard to understand) 2. i still don't understand about WH_CBT is used specifically for computer based training, what is it ?
If you Hook type is WH_KEYBOARD windows will send you all the keyboard actions that happen. So in this case your pHookProc should determine what to do with the keystrokes. Full information can be found here :- SetWindowHookEx Look at the bottom of the page for KeyboardProc - follow that link, and it will give you detailed info on the subject of hooking keyboard messages. On your second Question, the WH_CBT hook is used for computer based training, when this is in operation you have control over most things, so the user can't go off and play games, they have to do your course :) umbongo
oh thank's guys about your information this is a good site for looking for information that is not included in windows api reference :-> (more detail i guess) thank's who you are