ProcessWriting
1.0 2.0
Processes
handwriting.
Note This function
is provided only for compatibility with version 1.0 of the Pen API and will not
be supported in future versions. Use DoDefaultPenInput instead.
REC ProcessWriting( HWND hwnd, LPRC lprc
)
Parameters
hwnd
Window to
receive messages. This parameter must not be NULL.
lprc
Address of RC
Return Value
Returns
values less than 0 if the application should treat the event as a mouse event
instead of a pen event. Return values less than 0 occur if the event did not
come from a pen, the user performed a press-and-hold action (REC_POINTEREVENT),
or an error occurred for
example, running out of memory.
Comments
The ProcessWriting
function is similar to Recognize
Depending on
the existing code in an application, ProcessWriting may not be suitable
for making an application pen-aware. This function can also limit the power of
a pen interface.
If lprc
is NULL, a default RC
After the writing
is completed, the ink is removed before any messages are sent to hwnd.
After the ink is removed, the screen is updated and hwnd receives a
WM_RCRESULT message. If the application processes this message, it should
return TRUE. In this case, no further messages are sent.
If the
application returns FALSE, ProcessWriting performs the default
conversion of the results message to standard Windows messages, as shown in the
following table. The messages are sent rather than posted. Note that the DefWindowProc
Results
message |
Windows
message |
SYV_BACKSPACE |
WM_LBUTTONDOWN,
followed by WM_LBUTTONUP at the hot spot of the gesture, followed by WM_CHAR
specifying a backspace. |
SYV_CLEAR |
WM_CLEAR. |
SYV_CLEARWORD |
WM_LBUTTONDOWN,
WM_LBUTTONUP, WM_LBUTTONDBLCLK, WM_LBUTTONUP at the same point, followed by
WM_CLEAR. |
SYV_COPY |
WM_COPY. |
Results
message |
Windows
message |
SYV_CORRECT |
WM_LBUTTONDOWN,
WM_LBUTTONUP, WM_LBUTTONDBLCLK, WM_LBUTTONUP at the hot spot of the gesture,
followed by WM_COPY. At this point the Edit Text dialog box is activated; it
retrieves text from the Clipboard. This uses the existing selection, if any.
The previous contents of the Clipboard are lost. |
SYV_CUT |
WM_CUT. |
SYV_EXTENDSELECT |
WM_LBUTTONDOWN,
followed by WM_LBUTTONUP at the hot spot of the gesture. |
SYV_LASSO |
WM_LBUTTONDOWN
at upper-left corner of selected area, followed by WM_MOUSEMOVE message,
followed by WM_LBUTTONUP at the lower-right corner of selected area. |
SYV_PASTE |
WM_LBUTTONDOWN,
followed by WM_LBUTTONUP at the hot spot of the gesture, followed by
WM_PASTE. |
SYV_RETURN |
WM_LBUTTONDOWN,
followed by WM_LBUTTONUP at the hot spot of the gesture, followed by WM_CHAR specifying
a carriage return. |
SYV_SPACE |
WM_LBUTTONDOWN,
followed by WM_LBUTTONUP at the hot spot of the gesture, followed by WM_CHAR
specifying a space. |
SYV_TAB |
WM_LBUTTONDOWN,
followed by WM_LBUTTONUP at the hot spot of the gesture, followed by WM_CHAR specifying
a tab. |
SYV_UNDO |
WM_UNDO. |
text |
One WM_CHAR
message per character of text. |
The SYV_
symbol values in the previous table identify gestures. To see a complete list
of symbol values, refer to Chapter 13, Pen Application Programming Interface
Constants.
The lParam
of a WM_RCRESULT message generated by ProcessWriting is a far pointer to
an RCRESULT
See Also