SendMessage, PostMessage, and Related Functions
This section describes considerations about forwarding messages using SendMessage, PostMessage, and related functions with touch messages.
If a touch message is forwarded using SendMessage, PostMessage, or some other related function, the touch input handle is closed. If you have retrieved the information contained referenced by a touch input handle through a call to GetTouchInputInfo, that data will remain valid until you free the memory.
An application that receives touch messages forwarded through one of these mechanisms owns the touch input handle it receives in the message LPARAM and is responsible for closing it. If you don't close the handle with a call to CloseTouchInputHandle, pass the message to DefWindowProc, or forward the message using SendMessage, PostMessage, or some related function, you will have a memory leak.
Note
Touch messages are subject to normal User Interface Privilege Isolation (UIPI) rules when they are forwarded.
Functions related to SendMessage and PostMessage
The following functions that can affect the state of the touch input handle.
- SendMessage
- PostMessage
- SendNotifyMessage
- SendMessageCallback
- SendMessageTimeout
- PostThreadMessage
Related topics