I am using this for SetWindowsHookEx, and I have a couple questions:Code:#define DLL_EXPORT #define L 10 #include "dll.h" TCHAR str[L] = ""; int l = 0; extern "C" { DECLDIR LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam){ if(nCode == HC_ACTION && !(lParam & 2147483648)){ TCHAR t[1] = {(TCHAR)wParam}; if(l<L){ str[l] = (TCHAR)wParam; l++; } else{ l = 0; MessageBox(NULL, str, TEXT("Notice"), MB_OK); } } return CallNextHookEx(NULL, nCode, wParam, lParam); } }
1. MSDN says that KF_UP "manipulates the transition state flag." How can I use this to determine the transition state (instead of using lParam & 2147483648)?
2. When I type some stuff in and the message box is shown, everything is in caps. Why is this, and how do I allow lower case characters, too?
3. Also when the message box is shown, every few characters there is a character I didn't type (like Ü or ` or å). Why is this, and how do I prevent it from happening?
Thanks.



LinkBack URL
About LinkBacks


