|
ProcessWriting
- 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 structure to use for recognition. This parameter can be NULL.
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 except that ProcessWriting also takes care of inking, removing the ink, and converting the results
message to standard Windows messages.
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 structure is created for the application. The default RC structure contains all system defaults and the inking is constrained to the
client area of hwnd. If lprc points to a valid RC structure, the rectBound member of the RC structure is used to constrain the inking. Regardless of whether the
application provides an RC or not, ProcessWriting assumes a value of RRM_COMPLETE for the wResultMode member. See RC for a description of wResultMode and the RRM_ values.
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 function returns 0 when processing the WM_RCRESULT message.
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.
The MK_SHIFT flag is set for the wParam of these messages.
| 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 structure. By default, when an application receives a WM_RCRESULT message,
the hpendata member of the RCRESULT structure is NULL. If you need the HPENDATA handle, set the RCO_SAVEHPENDATA flag in the lRcOptions member of the RC structure. In this case, the calling application is responsible for
destroying the HPENDATA object.
See Also
DoDefaultPenInput, InitRC, Recognize, REC_, SYV_, RCO_
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|