How to diable Alt+tab key?

I was looking for how, but i didn't get that good way.

I can disable Alt + F4 in PreTranslateMessage(..).

So, I added a VK_TAB.

1
2
3
4
5
6
7
8
9
10
11
if(pMsg->message == WM_SYSKEYDOWN)
{
	if(pMsg->wParam == VK_F4)
	{
		return TRUE;
	}
	else if(pMsg->wParam == VK_TAB)
	{
		return TRUE;
	}
}


Alt + F4 works fine, but Alt + tab doesnt work.

How to disable Alt + Tab key?
I think alt+tab cannot be catched as other combinations like ctrl+alt+del.
look for "SetWindowsHookEx"
To disable Alt-Tab edit the following registry key, and then reboot:
1
2
[HKEY_CURRENT_USER\Control Panel\Desktop]
"CoolSwitch"="0"
@modoran - This is for non-programmers... OP wants to do it at run time.
Then do it programatically, what's stopping you to do it ? Is just a matter of writing a registry key.
You are not getting what he is trying to do.. when the application is running, it should get disabled/enabled at that very moment. Do you think a user should write a registry key and then reboot the machine to use the application. And then again, write the registry key to activate it and reboot the machine ?

Edit: he wants to catch alt+tab so that he can do some customized stuff.
Last edited on
Topic archived. No new replies allowed.