Solved

Disable CTRL+ESC Keys using C++/ MFC

Posted on 2002-05-13
5
958 Views
Last Modified: 2013-11-20
I want to diable the following key combinations for my MFC application.

1. CTRL-ESC
2. Windows key
3. CTRL-ALT-DEL
4. ALT-F4

How can I do it? Would appreciate if pseudo code/ sample code could be provided.
If there are any registry tweeks to disable these keys, I don't mind using those...

Thanks in advance.
0
Comment
Question by:rakhigovil
5 Comments
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 24 total points
ID: 7005523
u cannot disable Ctrl+Alt+Del.

Other can be disable by overriding WM_SYSKEYDOWN.

Or u can register hot keys for this keys using the api RegisterHotKey

GOOD LUCK
0
 
LVL 31

Assisted Solution

by:Zoppo
Zoppo earned 23 total points
ID: 7005703
AFAIK the only way to disable CTRL-ALT-DEL is to implement your own
GINA.DLL which replaces the GINA.DLL which is distributed with Windows
and use your own one as wrapper to call GINA.DLL's functions.

But, I think this should only be done if there's a really serious reason to do
this and not just for fun ... it maybe dangerous to do this because a bug in the
new GINA.DLL may leave an unusable system.
0
 
LVL 3

Assisted Solution

by:Crius
Crius earned 23 total points
ID: 7006454
Changing Gina.dll is not a good idea.

You can, however (as far as I know) hook the DLL, but it'll take a lot of research. Hooking is not quite as bad as changing the DLL, but it can lead to many of the same problems as actually changing the DLL.

A good tutorial on hooking can be found at
http://www.codeguru.com/system/apihook.html .
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sum28 challenge 31 107
post4 challenge 28 93
noX challenge 17 93
how to split multiple lines delimiter : 8 80
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now