SendInput() Keyboard letters C/C++

前端 未结 4 1428
终归单人心
终归单人心 2020-12-20 13:26

I am trying to use SendInput() to send a sentence to another application (Notepad) and then send it hitting the Enter Key.

Any code snippets?

4条回答
  •  無奈伤痛
    2020-12-20 13:58

    The SendInput function accepts an array of INPUT structures. The INPUT structures can either be a mouse or keyboard event. The keyboard event structure has a member called wVk which can be any key on the keyboard. The Winuser.h header file provides macro definitions (VK_*) for each key.

提交回复
热议问题