bool attach_thread_input(unsigned source, unsigned destination, bool attach)
This function attaches or detaches the input mechanism of one thread to or from another.
unsigned source
The identity of the thread whose input is to be attached or detached.
unsigned destination
The identity of the thread to receive the input of the thread thread.
bool attach
true | The input of the specified thread is to be attached to the destination thread. |
false | The input of the specified thread is to be detached from the destination thread. |
bool
true | The function succeeded. |
false | The call failed. |
Once a thread is attached to another thread, the input states are synchronized. These states include:
Unless both threads have an existing message queue this function fails. If a journal record hook is installed this function fails. A journal record hook merges the queues of all threads.
Upon calling this function, the key state (see get_key_state and get_keyboard_state) is reset.