InkEdit Control Reference
Collapse the table of content
Expand the table of content

InkEdit Control

InkEdit Control

The InkEdit control enables you to collect ink, recognize ink, and display ink as text. This control allows you to enable smart forms, which improves the accuracy of text input.

This control is a superset of the RichEdit Leave Site control. It extends the RichEdit Leave Site control with the ability to capture, recognize, and display ink.

This object can be instantiated by calling the CoCreateInstance Leave Site method in C++ or by using the New keyword in Microsoft® Visual Basic® 6.0.

Members

Enumerations

EnumerationDescription
AppearanceConstantsDefines values that specify whether the control appears flat or 3-D.
BorderStyleConstantsDefines values that specify whether the control has a border.
InkApplicationGestureDefines values that set the interest in a set of application-specific gestures.
InkDisplayModeDefines values that specify whether a selection appears as ink or text.
InkEditStatusDefines values that specify whether the InkEdit control is idle, collecting ink, or recognizing ink.
InkInsertModeDefines values that specify how ink is inserted onto the InkEdit control.
InkModeDefines values that specify the collection mode settings for drawn ink—whether ink collection is disabled, ink is collected, or ink and gestures are collected.
InkMouseButtonDefines values that specify which mouse button was pressed.
InkMousePointerDefines values that specify the type of mouse pointer that appears.
MouseButtonDefines values that specify which mouse button was pressed.
ScrollBarsConstantsDefines values that specify how the scroll bars of an InkEdit control appear on the screen.
SelAlignmentConstantsDefines values that specify the alignment of the paragraph relative to the margins of the InkEdit control.

Messages

Event notification messageDescription
IECN_STROKEThis message is sent through a WM_NOTIFY message when a stroke is completed (Win32 only).
IECN_GESTUREThis message is sent through a WM_NOTIFY message when a gesture is completed (Win32 only).
IECN_RECOGNITIONRESULTThis message is sent through a WM_NOTIFY message when recognition occurs (Win32 only).

Events

EventDescription
Change Leave SiteOccurs when the contents of the control or a property value change.
Click Leave SiteOccurs when the control is clicked.
DblClick Leave SiteOccurs when the control is double-clicked.
GestureOccurs when an application gesture is recognized.
KeyDownOccurs when the user presses a key while the InkEdit control has focus.
KeyPressOccurs when a key is pressed while the InkEdit control has focus.
KeyUpOccurs when a key is released while the InkEdit control has focus.
MouseDownOccurs when the mouse pointer is over the InkEdit control and a mouse button is pressed.
MouseMoveOccurs when the mouse pointer is moved over the InkEdit control.
MouseUpOccurs when the mouse pointer is over the InkEdit control and a mouse button is released.
RecognitionResultOccurs when the InkEdit control gets results manually from a call to the InkEdit::Recognize method or automatically after the recognition timeout has fired.
SelChange Leave SiteOccurs when the selection of ink within the InkEdit control changes.
StrokeOccurs when the user draws a new IInkStrokeDisp object on any IInkTablet object.

Get/Set Messages

Get/Set messageDescription
EM_GETINKMODEGets the ink mode of the control (Win32 only).
EM_SETINKMODESets the ink mode of the control (Win32 only).
EM_GETINKINSERTMODEGets the ink insertion mode of the control (Win32 only).
EM_SETINKINSERTMODESets the ink insertion mode of the control (Win32 only).
EM_GETDRAWATTRGets the current drawing attributes of the control (Win32 only).
EM_SETDRAWATTRSets the drawing attributes to use for future ink collection (Win32 only).
EM_GETRECOTIMEOUTGets the recognition timeout for the control (Win32 only).
EM_SETRECOTIMEOUTSets the recognition timeout for the control (Win32 only).
EM_GETGESTURESTATUSGets the gesture status for the control (Win32 only).
EM_SETGESTURESTATUSSets the gesture status for the control (Win32 only).
EM_GETRECOGNIZERGets the recognizer that the control uses (Win32 only).
EM_SETRECOGNIZERSets the recognizer that the control uses (Win32 only).
EM_GETFACTOIDGets the factoid to use for recognition (Win32 only).
EM_SETFACTIODSets the factoid to use for recognition (Win32 only).
EM_GETSELINKGets the ink in the selection (Win32 only).
EM_SETSELINKSets the ink in the selection (Win32 only).
EM_GETSELINKDISPLAYMODEReturns the current appearance of the ink in the selected range by using one of the values of the InkDisplayMode enumeration (Win32 only).
EM_SETSELINKDISPLAYMODESets the appearance of the ink in the selected range by using one of the values of the InkDisplayMode enumeration (Win32 only).
EM_GETSTATUSGets the status of the control (Win32 only).
EM_RECOGNIZEForces recognition (Win32 only).
EM_GETMOUSEICONGets the mouse icon (Win32 only).
EM_SETMOUSEICONSets the mouse icon (Win32 only).
EM_GETMOUSEPOINTERGets the mouse pointer (Win32 only).
EM_SETMOUSEPOINTERSets the mouse pointer Win32 only).
EM_GETUSEMOUSEFORINPUTGets the state of whether mouse input is treated like pen input (Win32 only).
EM_SETUSEMOUSEFORINPUTSets the state of whether mouse input is treated like pen input (Win32 only).

Methods

MethodDescription
GetGestureStatusGets the interest of the InkEdit control in a known set of gestures.
RecognizeSpecifies that recognition should occur.
SetGestureStatusSets the interest of the InkEdit control in a known set of gestures.

Properties

PropertyDescription
Appearance Leave SiteGets or sets a value that determines whether the InkEdit control appears flat or 3-D.
BackColor Leave SiteGets or sets the background color for the InkEdit control.
BorderStyle Leave SiteGets or sets a value that determines whether the InkEdit control has a border.
DisableNoScroll Leave SiteGets or sets a value that determines whether scroll bars in the InkEdit control are disabled.
DrawingAttributesGets or sets the drawing attributes for ink that is yet to be drawn on the InkEdit control.
Enabled Leave SiteGets or sets a value that determines whether the InkEdit control can respond to user-generated events.
FactoidGets or sets the Factoid constant that a IInkRecognizer object uses to constrain its search for the recognition result.
Font Leave SiteGets or sets the font of the text that the InkEdit control displays.
hWnd Leave SiteGets the window handle to which the InkDisp control is bound.
InkInsertModeGets or sets a value that specifies how ink is inserted onto the InkEdit control, either as text or as ink.
InkModeGets or sets a value that specifies whether ink collection is disabled, ink is collected, or ink and gestures are collected.
Locked Leave SiteGets or sets a value that specifies whether the InkEdit control is read-only or not.
MaxLength Leave SiteGets or sets a value indicating whether an InkEdit control can hold a maximum number of characters and, if so, specifies the maximum number of characters.
MouseIcon Leave SiteGets or sets the current custom mouse icon.
MousePointer Leave SiteGets or sets a value that indicates the type of mouse pointer that appears when the mouse is over a particular part of the InkEdit control.
MultiLine Leave SiteGets or sets a value that indicates whether this is a multiline InkEdit control.
RecognitionTimeoutGets or sets the length of time, in milliseconds, between the last IInkStrokeDisp object collected and the beginning of text recognition.
RecognizerGets or sets the IInkRecognizer object to use for recognition.
ScrollBars Leave SiteGets or sets the type of scroll bars that appear in the InkEdit control.
SelAlignment Leave SiteGets or sets the alignment to apply to the current selection or insertion point (run time only).
SelBold Leave SiteGets or sets a value that specifies whether the font style of the currently selected text in the InkEdit control is bold (run time only).
SelCharOffset Leave SiteGets or sets whether text in the InkEdit control appears on the baseline, as a superscript, or as a subscript (run time only).
SelColor Leave SiteGets or sets the text color of the current text selection or insertion point (run time only).
SelFontName Leave SiteGets or sets the font name of the selected text within the InkEdit control (run time only).
SelFontSize Leave SiteGets or sets the font size of the selected text within the InkEdit control (run time only).
SelInksGets or sets the array of embedded InkDisp objects (if displayed as ink) that the current selection contains.
SelInksDisplayModeGets or sets a value that allows toggling the appearance of the selection between ink and text.
SelItalic Leave SiteGets or sets a value that specifies whether the font style of the currently selected text in the InkEdit control is italic (run time only).
SelLength Leave SiteGets or sets the number of characters that are selected in the InkEdit control (run time only).
SelRTF Leave SiteGets or sets the currently selected Rich Text Format (RTF) formatted text in the InkEdit control (run time only).
SelStart Leave SiteGets or sets the starting point of the text that is selected in the text box (run time only).
SelText Leave SiteGets or sets the selected text within the InkEdit control (run time only).
SelUnderline Leave SiteGets or sets a value that specifies whether the font style of the currently selected text in the InkEdit control is underlined (run time only).
StatusGets a value that specifies whether the InkEdit control is idle, collecting ink, or recognizing ink (run time only).
Text Leave SiteGets or sets the current text in the text box.
TextRTF Leave SiteGets or sets the text of the InkEdit control, including all RTF codes.
UseMouseForInputGets or sets a value that indicates whether the mouse can be used as an input device.

Structures

StructureDescription
IEC_STROKEINFOContains information about a Stroke event (Win32 only).
IEC_GESTUREINFOContains information about a specific gesture (Win32 only).
IEC_RECOGNITIONRESULTINFOContains information about a recognition result (Win32 only).

Remarks

For Microsoft Win32® InkEdit applications, be sure to give a transparent window style to added static controls such as group boxes. Otherwise, the InkEdit control cannot collect ink.

You can not use the InkEdit control to render ink in Microsoft Windows® 2000, Windows Server 2003, or any edition of Windows XP other than Windows XP Tablet PC Edition. You can only input ink, accept gestures, or recognize handwriting under the following conditions:

  • Ink can be input and recognized only if Windows XP Tablet PC Edition is installed.
  • Gestures can be recognized only if Windows XP Tablet PC Edition is installed.
  • Handwriting can be recognized as text if the handwriting originated elsewhere and if recognizers are present.

If using Windows 2000, Windows Server 2003, or any edition of Windows XP other than Windows XP Tablet PC Edition, you can assign values to the InkEdit control's ambient properties and can copy and paste ink to other applications, but the value of its InkMode property is always Disabled.

Intelligent space insertion is available only when Windows XP Tablet PC Edition is installed.

Files with embedded InkDisp objects can be loaded and displayed in any edition of Windows XP (including Windows XP Tablet PC Edition) and on systems that may have only the Windows XP Tablet PC Edition Software Development Kit (SDK) installed. However, the embedded InkDisp objects can be converted to text only when Windows XP Tablet PC Edition is installed.

If operations on this control do not succeed, the returned error is a legal HRESULT from either the Microsoft Platform Software Development Kit (SDK) or the Tablet PC SDK Automation API. If error conditions are returned, check the returned HRESULT against both.

For more information about ink controls, see Ink Controls.

The InkEdit control API, both Win32 and Microsoft ActiveX®, is defined in InkEd.h.

For information about which threads raise particular events, see Threads on Which an Event Can Fire.

To improve your application's performance, manually dispose of an InkEdit control when it is no longer needed.

COM Implementation

This object implements the IInkEdit COM interface.

Related Topics

Show:
© 2016 Microsoft