How to disable Alt F4 with dWinlock?

To disable the above key combination with dWinlock you can use following function:

int wlDisableKey(int wnd, int vk, int mf, int disable)
Disable a single key or a key combination.

Examples:

wlDisableKey(0, VK_F1, 0, 1) // F1
wlDisableKey(0, VK_F1, MOD_ALT or MOD_CONTROL,1) // Alt+F1, Ctrl+F1, Alt+Ctrl+F1
wlDisableKey(0, VK_F1, MOD_ALL, 1) // Alt F1 with all modifiers (Shift, Ctrl, Alt, WinKey)

For further information, download our dWinlock trial version with comprehensive help file and several examples.

Remarks:

Under Windows NT, 2000, and XP systems, there is a special case:

wlDisableKey(0,VK_DELETE,MOD_CTRL or MOD_ALT,1)

To disable the Ctrl+Alt+Del shortcut on NT systems, dwlgina must be installed. If dwlgina is not installed, a dialog box will open and ask you if you want to install dwlgina. This has to be done only once, but you will need administrative rights to execute the installation. For further information see also: wlInstallGina.

Under Windows 95, 98, ME:

Disabling one of the following key combinations will disable them all:

ALT+ESC
ALT+TAB
CTRL+ESC
Win Keys
CTRL+ALT+DEL

dWinlock