Solved

Disable CTRL+ESC Keys using C++/ MFC

Posted on 2002-05-13
5
954 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
Comment Utility
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 30

Assisted Solution

by:Zoppo
Zoppo earned 23 total points
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

772 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

15 Experts available now in Live!

Get 1:1 Help Now