Home   Index   About
Ultimate Pack


Custom Search
Allocating Processing Time

After it has supplied the raw pen data to an HRC object, the application then allocates processing time for recognition by calling ProcessHRC. To accommodate applications with time-critical communications requirements or other CPU-intensive activities, ProcessHRC takes a time-out value (in milliseconds) as its second argument. If the time-out period elapses before ProcessHRC finishes processing, the function returns an HRCR_INCOMPLETE value. In this way, an application can repeatedly allocate small slices of time until the recognizer finishes its work.

PENWIN.H defines three time-out codes that an application can use when calling ProcessHRC. The following table describes the time-out codes.

Time-out code
Description
PH_MIN
Allocates the smallest possible period of time to the recognizer, approximately 50 milliseconds.
PH_DEFAULT
Allocates a moderate amount of time to the recognizer, approximately 200 milliseconds.
PH_MAX
Grants the recognizer as much time as it requires to complete the recognition.

The following line allocates the default time-out period to the recognizer in the HRC identified by the handle hrc1:

iRet = ProcessHRC( hrc1, PH_DEFAULT );

Typically, AddPenInputHRC and ProcessHRC work together in a loop or in repeated response to a PE_ message as the user writes. One function continually retrieves the latest pen data while the other processes that data. When the input session terminates, an application should call ProcessHRC with PH_MAX to finalize the recognition.

See the reference section for ProcessHRC in Chapter 10 for additional information about this function. When ProcessHRC returns, the application can retrieve results from the HRC object, as described in the next section.


Last news from Greatis Software

Nostalgia .Net     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 for Delphi and C++ Builder     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     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     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     Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available  More »

iGrid     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 projects

Dmitry Vasiliev (just.dmitry)

Related Links

Software 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

Free Tech Secrets ;) Copyright © 2008-2012 Free Tech Secrets ;) greatis just4fun network just4fun