Maybe you're being attracted to this title, Oh!
Long time no post, and seduce everyone's appetite, of course, some people have guessed the principle!
Now come, we must learn the principle of home, or on the senseless! Many games now do not support background message mouse, really not easy to achieve, what dll injection, ah, I learned to understand what the hook, it is simply another way of following the principle to say something about it (you can play below for practical realistic, I do not hide, and to see so many people reply, sorry conscience, huh) first, to click on the window all the windows covered above, the general pattern becomes sticky mode
SetWindowPos temp, -1, 0, 0, 0, 0, 1 Or 2 'Sticky
Then into a mouse model to penetrate the layered window
- ret = GetWindowLong(temp, GWL_EXSTYLE)
- ret = ret Or WS_EX_TRANSPARENT Or WS_EX_LAYERED
- SetWindowLong temp, GWL_EXSTYLE, RET
- SetLayeredWindowAttributes temp, 0, 255, LWA_ALPHA
Why should above top?
A: Not sticky, then when you click, you activate the selected window, front window automatically, become the front desk on the boring
why the first top, after stratification?
A: This is a test many times, and if after the first layered top, can not achieve top
How to get covered in the window above the handle ?
A: After a get a layered, hierarchical will be ignored WindowFromPoint (X, Y), just like transparent
sum up: API above is mainly used, in which the API stratification, the role of dX Screen and screen only professionals can comment, because I really do not know, the video will be black, DX screen Huaping, my solution is so and so have mentioned will drag any point outside the screen window on OK
the following are I put it into a plug-in , available for everyone to use exercise, perhaps you will have better ideas, but do not enjoy the time alone Oh!
Reproduced in: https: //www.cnblogs.com/rogee/archive/2011/05/02/2034662.html