Maybe you are attracted by this title!
I haven't posted a post for a long time. I want to seduce everyone's appetite. Of course, some people have already guessed the principle!
Now, I want to learn the principles, or I will be bored!
Many games currently do not support Background messaging and mouse. It is really not easy to implement. If you do not know what to inject dll and what to hook, you can simply find a different path.
Let's talk about the principles below (the following playbooks can be used in an unrealistic way, and I will not hide them. I can't help myself with my conscience when I see so many replies)
First, all the windows covered above the window to be clicked are changed from general mode to stick mode.
SetWindowPos temp,-1, 0, 0, 0, 0, 1 Or 2 'top
Then it becomes the mouse penetrating mode of 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
In this way, only the window you set will be displayed. The window covered above will only be visually displayed, so that you can click in the background!
Why should I stick it to the top?
A: If it is left unpinned, the selected window will be activated when you click it, and the window will be automatically prefixed. It will be boring if you change to the front-end.
Why do we need to pin it to the top and then layer it?
A: This is a test many times. If it is first layered and then topped, it cannot be implemented.
How do I obtain the handle covering the window above?
A: Get a layer. After the layer is layered, WindowFromPoint (X, Y) is ignored and transparent.
To sum up, the above is the main API used. The layered API can only comment on the video screen and dX screen. Because I really don't understand it, the video will turn black, the DX screen will be blurred. My solution is something someone once mentioned. It's okay to drag any point in the window out of the screen.
The following is a plug-in for you to practice. Maybe you will have a better idea and don't enjoy it alone!