A window receives a stylus message whenever a stylus event occurs within the window's client area. When the user presses the stylus to the screen, the window receives a WM_LBUTTONDOWN message. When the stylus is lifted from the screen, the window receives a WM_LBUTTONUP message. A window will receive a WM_LBUTTONDBLCLK instead of a WM_LBUTTONDOWN under the following conditions:
If the user moves the stylus while pressing it to the screen, Windows CE generates a WM_MOUSEMOVE message.
Styles input messages supported by Windows CE are described in the following table.
Message | Meaning |
---|---|
WM_LBUTTONDBLCLK | The user double-tapped the screen. |
WM_LBUTTONDOWN | The user pressed the screen. |
WM_LBUTTONUP | The user released the stylus from the screen. |
WM_MOUSEMOVE | The user moved the stylus while the tip was pressed to the screen. |
The lParam parameter of a stylus message indicates the position of the stylus tip. The low-order word is the x-coordinate and the high-order word is the y-coordinate. The coordinates are specified in client coordinates. In the client-coordinate system, all points are specified relative to the upper-left corner of the client area.
The wParam parameter contains flags that indicate the status of the other stylus buttons and the CTRL and SHIFT keys at the time of the stylus event. Check for these flags when the way you process a stylus event depends on the state of another stylus button or on the CTRL or SHIFT key. The wParam parameter can be a combination of the following flags.
Value | Meaning |
---|---|
MK_CONTROL | The CTRL key is down. |
MK_LBUTTON | The stylus is touching the screen. |
MK_SHIFT | The SHIFT key is down. |