How do I get the selected text from the focused window using native Win32 API?

后端 未结 3 730
失恋的感觉
失恋的感觉 2020-12-02 12:20

My app. will be running on the system try monitoring for a hotkey; when the user selects some text in any window and presses a hotkey, how do I obtain the selected text, whe

3条回答
  •  难免孤独
    2020-12-02 13:05

    Try adding a Sleep() after each SendInput(). Some apps just aren't that fast in catching keyboard input.

提交回复
热议问题