In WM6.0 SDK for native application, you have the new WISP Lite component allows user to input text with stylus, then WISP Lite can recognize the text.
Voici un exemple de code pour utiliser le WISP Lite:
Here is a code example for using WISP Lite:
Here is a code example for using WISP Lite:
- // Create the signature window
hWndInk = CreateWindow( TEXT("static"),
NULL,
WS_VISIBLE WS_CHILD WS_BORDER,
left,
top + 20,
215,
150,
hWnd,
NULL,
hInstance, NULL); - // Attach the inkoverlay to the windows and enable it
hr = ::CoCreateInstance(CLSID_InkOverlay,
NULL,
CLSCTX_INPROC_SERVER,
IID_IInkOverlay,
(void **)&g_pInkOverlay);
ASSERT(SUCCEEDED(hr));
hr = g_pInkOverlay->put_hWnd((long)hWndInk);
ASSERT(SUCCEEDED(hr));
hr = g_pInkOverlay->put_Enabled(VARIANT_TRUE);
ASSERT(SUCCEEDED(hr)); - // Get the strokes and convert to a string
hr = g_pInkOverlay->get_Ink( &pInk );
// Get all the strokes in the ink object
hr = pInk->get_Strokes(&pStrokes);
// Get the recognition result for these strokes
hr = pStrokes->get_RecognitionResult(&result);
// Get the top recognized string
hr = result->get_TopString(&resultString);
Et c'est fini, resultString contient la chaîne de caractères.
And it is finished, resultString contains the string.
Vous pouvez trouver des exemples plus complets dans le WM6 SDK Refresh :
You can find more examples in the WM6 SDK Refresh directory:
\Program Files\Windows Mobile 6 SDK\Samples\PocketPC\CPP\win32\WISPLite
2 comments:
Fabien, check out the managed wrapper OpenNETCF just released called Mobile Ink Library http://blog.markarteaga.com/OpenNETCFMobileInkLibraryForWindowsMobile6.aspx
Hi Mark,
Thanks for this link...
Fabien
Post a Comment