Bruno
08-26-2007, 09:06 PM
Hello, i saw a tutorial at the tutorial section (http://www.xcreations.net/~tpforums/forum/showthread.php?t=639) Ty Kekke!
I made it, but i dont know hot to change the key I pressed, like when i press 'm' i change to 'a'!
I tried this at the hook dll:
extern "C" __declspec (dllexport) LRESULT __stdcall KeyboardProc
(int code, WPARAM wParam, LPARAM lParam)
{
if(code == HC_ACTION) //if the wparam/lparam contains any data
{
if(wParam == VK_RETURN) //if wparam (which is a vk) is return
{
return 1; //return 1, which means that the key event wont be processed
}
}
return CallNextHookEx(0, code, 65, lParam); // 65 is an 'a'
}
I can read and log the keys on a file, i press 'a' and the wParam = 65, i change it on the return, but its not working! What i need to do?
Ty!
I made it, but i dont know hot to change the key I pressed, like when i press 'm' i change to 'a'!
I tried this at the hook dll:
extern "C" __declspec (dllexport) LRESULT __stdcall KeyboardProc
(int code, WPARAM wParam, LPARAM lParam)
{
if(code == HC_ACTION) //if the wparam/lparam contains any data
{
if(wParam == VK_RETURN) //if wparam (which is a vk) is return
{
return 1; //return 1, which means that the key event wont be processed
}
}
return CallNextHookEx(0, code, 65, lParam); // 65 is an 'a'
}
I can read and log the keys on a file, i press 'a' and the wParam = 65, i change it on the return, but its not working! What i need to do?
Ty!