1 #include <Windows.h>
2 #include <stdlib.h>
3
4 // 自身的窗口句柄 父窗口句柄 命令 控制显示或者隐藏
5 int APIENTRY WinMain(HINSTANCE hinstance, HINSTANCE hpreinstance, LPSTR cmdline,
int mcmdshow)
6 {
7 RegisterHotKey(NULL,
0x001, MOD_CONTROL,
'M');
8 MSG msg;
9 while (GetMessage(&msg, NULL,
0,
0))
10 {
11 if (msg.message ==
WM_HOTKEY)
12 {
13 if (msg.wParam ==
001)
14 {
15 keybd_event(
'M',
0,
0,
0);
16 keybd_event(
'M',
0,
2,
0);
17 }
18 //exit(0);
19 }
20 }
21 }
转载于:https://www.cnblogs.com/xiaochi/p/8305646.html
相关资源:电脑常见问题与故障1000例(高清PDF中文版)