Q Key Bursts. Press and hold the Q key to bursts. Release then stop 1. 1 floor. The detection button is pressed, allowing a section of the daemon to begin execution.
2 floor. Gets the Hwnd of the background input window.
child window to take the HWND of the child window. DX Software drawing window, to use DX button mode.
.
Using API functions,
ret = Getasynckeystate (81) to detect.
can be so simple to understand,
RET is less than-1, then hold.
RET is greater than-1, it is not pressed.
.
When the Q key is detected, the loop switch = 1 allows a background program to start executing.
Detect Q key Bounce, cycle switch = 0, the end of a section of the execution of the background program.
.
while (1)//loop
while (loop switch)//small loop
Background button Q (Hwnd)
Sleep (10)
End
//
Sleep (100)
End
Getasynckeystate,
Library: User32.dll.
< return value;: Long
Parameter 1:integer
//
Since the last call to the Getasynckeystate function,
If the key has been pressed, bit 0 is set to 1; otherwise set to 0.
//
If the key is currently in the pressed state, bit 15 is set to 1, or 0 if lifted.
//
The Getasynckeystate function returns the state value of the specified virtual key instantaneous, which has four return values:
0---Key is not currently in the pressed state, and the key has not been pressed since the last call to Getasynckeystate;
1---Key is not currently in the pressed state, but before (since the last call to Getasynckeystate) The key has been pressed;
-32768 (that is, 16 decimal &h8000)---Key is currently in the pressed state, but before (since the last call to Getasynckeystate) The key has not been pressed;
-32767 (that is, 16 decimal &h8001)---Key is currently in the pressed state, and the key has been pressed before (since the last call to Getasynckeystate).
//
Vk_lbutton left mouse button 0x01
Vk_rbutton right mouse button 0x02
Vk_cancel Ctrl + Break 0x03
Vk_mbutton Mouse Middle Key 0x04
Vk_back backspace key 0x08
Vk_tab TAB Key 0x09
Vk_return Enter 0x0D
0x is the 16 binary number of the C language.
16 binary number of 0D, written as 10 binary number is 13.
.
.
The API for the foreground key is separate from the API for the background key. Each has its own channel.
Q Key Bursts. Press and hold the Q key to bursts. Release then stop 1.