gMsgHook = SetWindowsHookEx(WH_KEYBOARD_LL, GetMsgHookProc, ghInstDll, 0);
.......
extern "C" HOOK_DLL_API LRESULT CALLBACK GetMsgHookProc(int nCode, WPARAM wParam, LPARAM lParam)
{
if (nCode < 0){
CallNextHookEx(gMsgHook, nCode, wParam, lParam);
}
KBDLLHOOKSTRUCT *dl = (KBDLLHOOKSTRUCT*)wParam;
if (nCode >= HC_ACTION){
// message mirror to hEdit1
// doesnt typing work
SendMessage(hEdit1, wParam, wParam, lParam);
}
return CallNextHookEx(gMsgHook, nCode, wParam, lParam);
}