LA TOUCHE ECHAP

cs_bilal Messages postés 87 Date d'inscription dimanche 2 février 2003 Statut Membre Dernière intervention 4 mars 2010 - 3 avril 2003 à 00:30
BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019 - 3 avril 2003 à 01:04
VGTA

JE VEUX BLOQUER CTRL_ECHAP

J'Y ARRIVE SOUS WIN9X MAIS PAS SUR LES SYSTEM NT

EST CE POSSIBLE OU J'ABANDONNE ???

merci a tous de me donner d idées
@+

1 réponse

BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019
3 avril 2003 à 01:04
Exemple MS si systeme NT

LRESULT CALLBACK LowLevelKeyboardProc(int nCode,
WPARAM wParam, LPARAM lParam) {

BOOL fEatKeystroke = FALSE;

if (nCode == HC_ACTION) {
switch (wParam) {
case WM_KEYDOWN: case WM_SYSKEYDOWN:
case WM_KEYUP: case WM_SYSKEYUP:
PKBDLLHOOKSTRUCT p = (PKBDLLHOOKSTRUCT) lParam; fEatKeystroke ((p->vkCode VK_TAB) && ((p->flags & LLKHF_ALTDOWN) != 0)) ||
((p->vkCode == VK_ESCAPE) && ((p->flags & LLKHF_ALTDOWN) != 0)) ||
((p->vkCode == VK_ESCAPE) && ((GetKeyState(VK_CONTROL) & 0x8000) != 0));
break;
}
}
return(fEatKeystroke ? 1 : CallNextHookEx(NULL, nCode, wParam, lParam));
}

int WINAPI WinMain(HINSTANCE hinstExe, HINSTANCE, PTSTR pszCmdLine, int) {

// Install the low-level keyboard & mouse hooks
HHOOK hhkLowLevelKybd = SetWindowsHookEx(WH_KEYBOARD_LL,
LowLevelKeyboardProc, hinstExe, 0);

// Keep this app running until we're told to stop
MessageBox(NULL,
TEXT("Alt+Esc, Ctrl+Esc, and Alt+Tab are now disabled.\n")
TEXT("Click "Ok" to terminate this application and re-enable these keys."),
TEXT("Disable Low-Level Keys"), MB_OK);
UnhookWindowsHookEx(hhkLowLevelKybd);
return(0);
}

BruNews, ciao...
0
Rejoignez-nous