Setting Up the HWXGUIDE Structure

You define the size and position of the box or boxes used for character entry within the HWXGUIDE structure. For interpreting inked input coordinates, the HwxSetGuide function provides the recognition engine with the coordinates to the HWXGUIDE structure. The following illustration shows the dimensions of a character input box.

The base (cyBase) and midline (cyMid) in the HWXGUIDE structure are used primarily for characters and are not required for glyphs. Placement of a specific box within the target device display is defined by the xOrigin and yOrigin parameters. Offset parameters establish a buffer space between each box when multiple boxes are used to prevent a user from overwriting ink data from one box into another. In the event that you overwrite ink data, the recognition engine must determine to which box the ink data corresponds.

After initializing the handwriting recognition engine with HwxConfig, the entire recognition process begins and ends with the creation and destruction of a handwriting recognition context (HRC) object. Similar to a handle to a window or a handle to a device context, an HRC is a unique 32-bit handle that is used by the recognition engine for handwriting recognition. An HRC is used for input in a single box or multiple boxes. It carries all ink data and setup parameters that are necessary for recognizing a glyph, one character, or multiple characters. Use HwxCreate and HwxDestroy, respectively, to create and destroy an HRC object.