InkEdit Control Reference

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 control. It extends the RichEdit control with the ability to capture, recognize, and display ink.

This object can be instantiated by calling the CoCreateInstance method in C++.

Creating the InkEdit control behind a transparent control (such as a GroupBox with the WS_EX_TRANSPARENT property set) will prevent InkEdit from collecting ink.

Members

Enumeration Description
AppearanceConstants Defines values that specify whether the control appears flat or 3-D.
BorderStyleConstants Defines values that specify whether the control has a border.
InkApplicationGesture Defines values that set the interest in a set of application-specific gestures.
InkDisplayMode Defines values that specify whether a selection appears as ink or text.
InkEditStatus Defines values that specify whether the InkEdit control is idle, collecting ink, or recognizing ink.
InkInsertMode Defines values that specify how ink is inserted onto the InkEdit control.
InkMode Defines values that specify the collection mode settings for drawn ink-whether ink collection is disabled, ink is collected, or ink and gestures are collected.
InkMouseButton Defines values that specify which mouse button was pressed.
InkMousePointer Defines values that specify the type of mouse pointer that appears.
MouseButton Defines values that specify which mouse button was pressed.
ScrollBarsConstants Defines values that specify how the scroll bars of an InkEdit control appear on the screen.
SelAlignmentConstants Defines values that specify the alignment of the paragraph relative to the margins of the InkEdit control.
Event notification message Description
IECN_STROKE This message is sent through a WM_NOTIFY message when a stroke is completed (Win32 only).
IECN_GESTURE This message is sent through a WM_NOTIFY message when a gesture is completed (Win32 only).
IECN_RECOGNITIONRESULT This message is sent through a WM_NOTIFY message when recognition occurs (Win32 only).
Event Description
Change Occurs when the contents of the control or a property value change.
Click Occurs when the control is clicked.
DblClick Occurs when the control is double-clicked.
Gesture Occurs when an application gesture is recognized.
KeyDown Occurs when the user presses a key while the InkEdit control has focus.
KeyPress Occurs when a key is pressed while the InkEdit control has focus.
KeyUp Occurs when a key is released while the InkEdit control has focus.
MouseDown Occurs when the mouse pointer is over the InkEdit control and a mouse button is pressed.
MouseMove Occurs when the mouse pointer is moved over the InkEdit control.
MouseUp Occurs when the mouse pointer is over the InkEdit control and a mouse button is released.
RecognitionResult Occurs when the InkEdit control gets results manually from a call to the Recognize method or automatically after the recognition timeout has fired.
SelChange Occurs when the selection of ink within the InkEdit control changes.
Stroke Occurs when the user draws a new IInkStrokeDisp object on any IInkTablet object.
Get/Set message Description
EM_GETINKMODE Gets the ink mode of the control (Win32 only).
EM_SETINKMODE Sets the ink mode of the control (Win32 only).
EM_GETINKINSERTMODE Gets the ink insertion mode of the control (Win32 only).
EM_SETINKINSERTMODE Sets the ink insertion mode of the control (Win32 only).
EM_GETDRAWATTR Gets the current drawing attributes of the control (Win32 only).
EM_SETDRAWATTR Sets the drawing attributes to use for future ink collection (Win32 only).
EM_GETRECOTIMEOUT Gets the recognition timeout for the control (Win32 only).
EM_SETRECOTIMEOUT Sets the recognition timeout for the control (Win32 only).
EM_GETGESTURESTATUS Gets the gesture status for the control (Win32 only).
EM_SETGESTURESTATUS Sets the gesture status for the control (Win32 only).
EM_GETRECOGNIZER Gets the recognizer that the control uses (Win32 only).
EM_SETRECOGNIZER Sets the recognizer that the control uses (Win32 only).
EM_GETFACTOID Gets the factoid to use for recognition (Win32 only).
EM_SETFACTIOD Sets the factoid to use for recognition (Win32 only).
EM_GETSELINK Gets the ink in the selection (Win32 only).
EM_SETSELINK Sets the ink in the selection (Win32 only).
EM_GETSELINKDISPLAYMODE Returns the current appearance of the ink in the selected range by using one of the values of the InkDisplayMode enumeration (Win32 only).
EM_SETSELINKDISPLAYMODE Sets the appearance of the ink in the selected range by using one of the values of the InkDisplayMode enumeration (Win32 only).
EM_GETSTATUS Gets the status of the control (Win32 only).
EM_RECOGNIZE Forces recognition (Win32 only).
EM_GETMOUSEICON Gets the mouse icon (Win32 only).
EM_SETMOUSEICON Sets the mouse icon (Win32 only).
EM_GETMOUSEPOINTER Gets the mouse pointer (Win32 only).
EM_SETMOUSEPOINTER Sets the mouse pointer Win32 only).
EM_GETUSEMOUSEFORINPUT Gets the state of whether mouse input is treated like pen input (Win32 only).
EM_SETUSEMOUSEFORINPUT Sets the state of whether mouse input is treated like pen input (Win32 only).
Method Description
GetGestureStatus Gets the interest of the InkEdit control in a known set of gestures.
Recognize Specifies that recognition should occur.
Refresh Causes the control to redraw.
SetGestureStatus Sets the interest of the InkEdit control in a known set of gestures.
Property Description
Appearance Gets or sets a value that determines whether the InkEdit control appears flat or 3-D.
BackColor Gets or sets the background color for the InkEdit control.
BorderStyle Gets or sets a value that determines whether the InkEdit control has a border.
DisableNoScroll Gets or sets a value that determines whether scroll bars in the InkEdit control are disabled.
DrawingAttributes Gets or sets the drawing attributes for ink that is yet to be drawn on the InkEdit control.
Enabled Gets or sets a value that determines whether the InkEdit control can respond to user-generated events.
Factoid Gets or sets the Factoid constant that a IInkRecognizer object uses to constrain its search for the recognition result.
Font Gets or sets the font of the text that the InkEdit control displays.
hWnd Gets the window handle to which the InkDisp control is bound.
InkInsertMode Gets or sets a value that specifies how ink is inserted onto the InkEdit control, either as text or as ink.
InkMode Gets or sets a value that specifies whether ink collection is disabled, ink is collected, or ink and gestures are collected.
Locked Gets or sets a value that specifies whether the InkEdit control is read-only or not.
MaxLength Gets 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 Gets or sets the current custom mouse icon.
MousePointer Gets 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 Gets or sets a value that indicates whether this is a multiline InkEdit control.
RecognitionTimeout Gets or sets the length of time, in milliseconds, between the last IInkStrokeDisp object collected and the beginning of text recognition.
Recognizer Gets or sets the IInkRecognizer object to use for recognition.
ScrollBars Gets or sets the type of scroll bars that appear in the InkEdit control.
SelAlignment Gets or sets the alignment to apply to the current selection or insertion point (run time only).
SelBold Gets 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 Gets or sets whether text in the InkEdit control appears on the baseline, as a superscript, or as a subscript (run time only).
SelColor Gets or sets the text color of the current text selection or insertion point (run time only).
SelFontName Gets or sets the font name of the selected text within the InkEdit control (run time only).
SelFontSize Gets or sets the font size of the selected text within the InkEdit control (run time only).
SelInks Gets or sets the array of embedded InkDisp objects (if displayed as ink) that the current selection contains.
SelInksDisplayMode Gets or sets a value that allows toggling the appearance of the selection between ink and text.
SelItalic Gets 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 Gets or sets the number of characters that are selected in the InkEdit control (run time only).
SelRTF Gets or sets the currently selected Rich Text Format (RTF) formatted text in the InkEdit control (run time only).
SelStart Gets or sets the starting point of the text that is selected in the text box (run time only).
SelText Gets or sets the selected text within the InkEdit control (run time only).
SelUnderline Gets or sets a value that specifies whether the font style of the currently selected text in the InkEdit control is underlined (run time only).
Status Gets a value that specifies whether the InkEdit control is idle, collecting ink, or recognizing ink (run time only).
Text Gets or sets the current text in the text box.
TextRTF Gets or sets the text of the InkEdit control, including all RTF codes.
UseMouseForInput Gets or sets a value that indicates whether the mouse can be used as an input device.
Structure Description
IEC_STROKEINFO Contains information about a Stroke event (Win32 only).
IEC_GESTUREINFO Contains information about a specific gesture (Win32 only).
IEC_RECOGNITIONRESULTINFO Contains information about a recognition result (Win32 only).

COM Implementation

This object implements the IInkEdit COM interface.