Solved

Disable CTRL+ESC Keys using C++/ MFC

Posted on 2002-05-13
5
962 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

770 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