C++ Hotkey to run function

前端 未结 1 1065
梦毁少年i
梦毁少年i 2021-01-29 16:14

Hey looking to assign F1 as a hotkey to run a function. I have a windows 32 project with a Form, however the form will be in the background and not the active window

相关标签:
1条回答
  • 2021-01-29 16:32

    Have a look at the RegisterHotKey function.

    It allows you to define a system-wide hot key. When the hot key is pressed, you will receive a WM_HOTKEY message even if your window is not active.

    0 讨论(0)
提交回复
热议问题