Reputation: 353
I'm trying to create a custom crosshair for a game called overwatch. My current solution is to create a topmost window that sits above the game while it plays using WS_EX_LAYERED, but WS_EX_LAYERED has such a huge performance hit to the game that I've decided it's an unviable solution. Are there any other ways I can make my tiny 4x4 pixel window click-through? (I already tried handling WM_NCHITTEST and returning HTTRANSPARENT/HTNOWHERE, both don't result in properly clicking through the window since it still takes the focus off of the window underneath.)
Upvotes: 2
Views: 1602
Reputation: 35613
You can use a Region window for this:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd145102(v=vs.85).aspx
Upvotes: 1