How can I get functionality similar to Spy++ in my C# app?

前端 未结 5 1762
情书的邮戳
情书的邮戳 2020-12-02 15:15

I\'m interested in working on a plugin for Keepass, the open-source password manager. Right now, Keepass currently detects what password to copy/paste for you based off of

5条回答
  •  醉梦人生
    2020-12-02 15:39

    For the functionality of pointing to a window. You need to SetCapture() so that you get mouse messages that are outside of your window. Then use WindowFromPoint() to convert a mouse position to a Window. You will need to convert the moust position from client coordinates to window coordinates first.

    If you try an call SetCapture() anywhere but on a mouse click message, you will probably be ignored. This is the reason that Spy++ makes you click on an Icon and drag and drop it on the window you want to point to.

提交回复
热议问题