vc如何屏蔽Ctrl+Alt+Delete消息啊

来源:百度知道 编辑:UC知道 时间:2024/05/28 12:54:52

应该是写一个全局的钩子。写在DLL中。

我已经回答过了:
http://zhidao.baidu.com/question/124463368.html

完成这一功能的最简单方法是使用RegisterHotKey函数。在调用该函数后你的进程回在ctrl + alt + del 按下时比系统先得到通知。 你需要处理的消息是WM_HOTKEY。

BOOL RegisterHotKey(HWND hWnd, int id, UINT fsModifiers, UINT vk);
参数 fsModifiers指明与热键联合使用按键,可取值为:MOD_ALT MOD_CONTROL MOD_WIN MOD_SHIFT
参数 vk指明热键的虚拟键码
The RegisterHotKey function defines a system-wide hot key.

Syntax

BOOL RegisterHotKey( HWND hWnd,
int id,
UINT fsModifiers,
UINT vk
);
Parameters

hWnd
[in] Handle to the window that will receive WM_HOTKEY messages generated by the hot key. If this parameter is NULL, WM_HOTKEY messages are posted to the message queue of the calling thread and must be processed in the message loop.<