热键

it2022-05-05  108

#include <Windows.h> int APIENTRY WinMain(HINSTANCE hinstance,HINSTANCE hpreinstance,LPSTR cmdline,int mcmdshow) { RegisterHotKey(NULL, 0x001, MOD_CONTROL, '1'); MSG msg; while (GetMessage(&msg,NULL,0,0)) { if (msg.message == WM_HOTKEY) { MessageBoxA(0, "即将退出", "确定", 0); exit(0); } } }

 

转载于:https://www.cnblogs.com/xiaochi/p/5138750.html

相关资源:热键检测工具

最新回复(0)