The bounty of 200 reputation for this question is valid for 4 more days. It would be a shame if it just expired.
The bounty of 200 reputation for this question is valid for 4 more days. It would be a shame if it just expired.
http://stackoverflow.com/q/32058232/49925
http://stackoverflow.com/q/32058232/49925
I think the concensus was that yes, it can be done, but it will not scale because it will clash on systems where other apps do the same thing.
ReplyDeletethe answer from Alex Egorov is more than sound, I'd go with that...
ReplyDeleteDorin Duminica
ReplyDeleteThat's not an answer at all.
Johan Bontes are you sure? 'cause that's a clear list of steps... all it's missing is the actual implementation...
ReplyDeleteI don't care whether it scales or conflicts with other programs doing the same. It's for my personal use only.
ReplyDeleteWas my answer (in a comment) about adding it as a window (set up the z-order, non-focusable, etc), then using hooks to get window move notifications and adjust the button-window's position so it stays in the right relative position, useful at all?
ReplyDeleteIt's what I'd try first up, before using DLL injection.
Long time since I've done such tricks. I think I'd start by trying https://msdn.microsoft.com/en-us/library/windows/desktop/ms644975.aspx
ReplyDeleteThis would be to monitor for the WM_NCPAINT etc messages. Clicks would be forwarded to my application by posting a special message.