![]() |
|
BLOCK KEYS IN C++ - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Programmers Gateway (https://lckb.dev/forum/forumdisplay.php?fid=196) +---- Forum: Coders Talk (https://lckb.dev/forum/forumdisplay.php?fid=192) +---- Thread: BLOCK KEYS IN C++ (/showthread.php?tid=2123) |
- Douglas Farias - 07-07-2013 HI I TRY MAKE A SIMPLE BLOCK KEY BUT IT DONT WORK *-* WHAT IS INCORRECT ? IS C++ AND COMPILE OK BUT DONT WORK *-* // verifica teclas proibidas #define qtdKey 25 static DWORD checkForForbiddenKeys(LPVOID args) { const WORD fbKeys[qtdKey] = { VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT, VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PAUSE, VK_PRIOR, VK_NEXT, VK_SCROLL, VK_NUMLOCK VK_F12 VK_F11 VK_F10 VK_F9 VK_F8 VK_F7 VK_F6 VK_F5 VK_F4 VK_F3 VK_F2 VK_F1 }; for (; {for (unsigned i = 0; i < qtdKey; i++) { if (GetAsyncKeyState(fbKeys[i]) & 0x8000) ExitProcess(0); } Sleep(10); } } DONE CAN CLOSE =) - Johnny5 - 07-07-2013 Topic Closed by a moderator. The reason why: Request By Post Owned |