InkEdit Messages (Win32 Only)

The InkEdit control is a super class of the RichEdit control. Every RichEdit message is passed on, directly in most cases, and has exactly the same effect as in RichEdit. This also applies to event notification messages.

To send these messages, call the SendMessage function with the following parameters:

C++
LRESULT SendMessage(  HWND hWnd,      // handle to destination window  UINT Msg,       // message  WPARAM wParam,  // first message parameter  LPARAM lParam   // second message parameter);

Message

The parent window of the InkEdit control receives event notification messages through the WM_NOTIFY message:

LRESULT CALLBACK WindowProc(
    HWND hWnd,                // handle to window
    UINT uMsg,                // WM_NOTIFY
    WPARAM wParam,        // InkEdit control identifier
    LPARAM lParam            // see documentation for notification messages
);
Get/set message Description
EM_GETINKMODE
Gets the inking mode of the InkEdit control.
Parameters:
This message has no parameters; wParam and lParam must be 0.
Return values:
This message returns one of the values that are defined in the InkMode enumeration, which specifies whether ink collection is disabled, whether ink is collected, or whether ink and gestures are collected.
EM_SETINKMODE
Sets the inking mode of the InkEdit control.
Parameters:
wParamSpecifies one of the values of the InkMode enumeration, which specifies whether ink collection is disabled, whether ink is collected, or whether ink and gestures are collected.
lParamThis parameter is not used; it must be 0.
Return Values:
This message returns 0 if successful or nonzero if an error occurs.
Remarks:
This should only be used if the EM_GETSTATUS returns IES_Idle.
EM_GETINKINSERTMODE
Gets the ink insertion mode of the InkEdit control.
Parameters:
This message has no parameters; wParam and lParam must be 0.
Return values:
This message returns one of the values of the InkInsertMode enumeration, which specifies whether ink is inserted into the control as text or as ink.
EM_SETINKINSERTMODE
Sets the ink insertion mode of the InkEdit control. Sending this message has no effect if used with any operating system installed other than Microsoft Windows XP Tablet PC Edition.
Parameters:
wParamSpecifies one of the values of the InkInsertMode enumeration, which specifies whether ink is inserted into the control as text or as ink.
lParamThis parameter is not used; it must be 0.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
EM_GETDRAWATTR
Gets the current drawing attributes of the InkEdit control.
Parameters:
wParamThis parameter is not used; it must be 0.
lParamSpecifies a pointer (IInkDrawingAttributes **pDrawAttr) to receive the current InkDrawingAttributes object.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
EM_SETDRAWATTR
Sets the drawing attributes to use for future ink collection.
Parameters:
wParamThis parameter is not used; it must be 0.
lParamSpecifies a pointer (IInkDrawingAttributes *pDrawAttr) to an InkDrawingAttributes object.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
EM_GETRECOTIMEOUT
Gets the recognition timeout, in milliseconds, for the InkEdit control.
Parameters:
This message has no parameters; wParam and lParam must be 0.
Return values:
This message returns the recognition timeout, in milliseconds.
EM_SETRECOTIMEOUT
Sets the recognition timeout, in milliseconds, for the InkEdit control.
Parameters:
wParamSpecifies the recognition timeout, in milliseconds.
lParamThis parameter is not used; it must be 0.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
EM_GETGESTURESTATUS
Gets the gesture status for the InkEdit control.
Parameters:
wParamSpecifies the type of gesture, as defined in the InkApplicationGesture enumeration.
lParamThis parameter is not used; it must be 0.
Return values:
This message returns TRUE if the InkEdit control subscribes to the gesture or FALSE if the InkEdit control does not subscribe to the gesture.
EM_SETGESTURESTATUS
Sets the gesture status for the InkEdit control.
Parameters:
wParamSpecifies the type of gesture, as defined in the InkApplicationGesture enumeration.
lParamSpecifies TRUE if subscribing to the gesture is enabled or FALSE if listening to the gesture is not enabled.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
Remarks:
This should only be used if the EM_GETSTATUS returns IES_Idle.
EM_GETRECOGNIZER
Gets the recognizer that the InkEdit control uses.
Parameters:
wParamThis parameter is not used; it must be 0.
lParamSpecifies a pointer to an IInkRecognizer* to receive the IInkRecognizer object that the InkEdit control uses.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
EM_SETRECOGNIZER
Sets the recognizer that the InkEdit control uses. If a Factoid is used for the InkEdit control, it must be reapplied after sending this message.
Parameters:
wParamThis parameter is not used; it must be 0.
lParamSpecifies a pointer to an IInkRecognizer* to set the IInkRecognizer object that the InkEdit control uses for later use.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
Remarks:
This should only be used if the EM_GETSTATUS returns IES_Idle.
EM_GETFACTOID
Gets the Factoid to use for recognition.
Parameters:
wParamThis parameter is not used; it must be 0.
lParamSpecifies a pointer to a BSTR to receive the factoid string.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
EM_SETFACTOID
Sets the Factoid to use for recognition.
Parameters:
wParamThis parameter is not used; it must be 0.
lParamSpecifies the BSTR that contains the factoid string.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
Remarks:
This should only be used if the EM_GETSTATUS returns IES_Idle.
EM_GETSELINK
Gets the ink within the selection. Ink must be recognized before being accessed through this message. If it is not recognized first, EM_GETSELINK always returns zero InkDisp objects.
Parameters:
wParamThis parameter is not used; it must be 0.
lParamSpecifies a pointer to a VARIANT to receive a safe array to receive InkDisp objects within the current selection.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
EM_SETSELINK
Sets the ink within the selection. Sending this message has no effect if used with any operating system installed other than Windows XP Tablet PC Edition.
Parameters:
wParamThis parameter is not used; it must be 0.
lParamSpecifies a pointer to a VARIANT with a safe array of InkDisp objects to replace the current selection.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
EM_GETSELINKDISPLAYMODE
Returns the current appearance of the ink in the selected range by using one of the values of the InkDisplayMode enumeration.
Parameters:
This message has no parameters; wParam and lParam must be 0.
Return values:
This message returns one of the values of the InkDisplayMode enumeration (IDM_Text or IDM_Ink), which specifies how a selection appears on the control.
EM_SETSELINKDISPLAYMODE
Sets the appearance of the ink in the selected range by using one of the values of the InkDisplayMode enumeration.
Parameters:
wParamThis parameter is not used; it must be 0.
lParamSpecifies how ink appears in the selected range, as defined in the InkDisplayMode enumeration.
Return values:
This message returns 0 if successful or nonzero if an error occurs. Sending this message has no effect if used with any operating system installed other than Windows XP Tablet PC Edition.
EM_GETSTATUS
Gets the status of the InkEdit control.
Parameters:
This message has no parameters; wParam and lParam must be 0.
Return values:
This message returns one of the values of the InkEditStatus enumeration, which specifies whether the control is idle, collecting ink, or recognizing ink.
EM_RECOGNIZE
Forces recognition.
Parameters:
This message has no parameters; wParam and lParam must be 0.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
EM_GETMOUSEICON
Gets the mouse icon.
Parameters:
wParamThis parameter is not used; it must be 0.
lParamSpecifies a HICON* pointer that is filled in with the current MouseIcon HICON. This HICON can be either a HICON or a NULL value.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
EM_SETMOUSEICON
Sets the mouse icon.
Parameters:
wParamSpecifies a BOOLEAN value that is set to TRUE if the InkEdit control should own the HICON handle or FALSE if the InkEdit control should not own the HICON handle. If the InkEdit control owns the HICON, then it takes care of and destroys the HICON appropriately. Otherwise, the caller owns the HICON and is responsible for deleting it.
lParamSpecifies the new HICON value. Use NULL to clear the value. The default value is NULL.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
EM_GETMOUSEPOINTER
Gets the mouse pointer.
Parameters:
wParamThis parameter is not used; it must be 0.
lParamContains an InkMousePointer* pointer that is filled in with the current MousePointer value. This behaves the same as the InkCollector::get_MousePointer property.
Return Values:
This message returns 0 if successful or nonzero if an error occurs.
EM_SETMOUSEPOINTER
Sets the mouse pointer.
Parameters:
wParamThis parameter is not used; it must be 0.
lParamContains the new MousePointer value, which is defined in the InkMousePointer enumeration. This behaves the same as the InkCollector::put_MousePointer property.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
EM_GETUSEMOUSEFORINPUT
Gets the state of whether mouse input is treated as pen input.
Parameters:
This message has no parameters; wParam and lParam must be 0.
Return values:
This message returns 0 if FALSE or 1 if TRUE.
EM_SETUSEMOUSEFORINPUT
Sets the state of whether mouse input is treated as pen input.
Parameters:
wParamSpecifies a Boolean value that determines whether to treat mouse input as pen input.
lParamThis parameter is not used; it must be 0.
Return values:
This message returns 0 if successful or nonzero if an error occurs.
Remarks:
This should only be used if the EM_GETSTATUS returns IES_Idle.
Event notification message Description
IECN_STROKE
Notifies the InkEdit control's parent window that a IInkStrokeDisp has been created. This is sent in a WM_NOTIFY message with the following parameters.
Parameters:
wParamSpecifies the identifier of the control that sent the message.
lParamSpecifies a pointer to the IEC_STROKEINFO structure.
Return values:
The client returns 0 to accept the stroke and 1 to cancel the stroke.
IECN_GESTURE
Notifies the InkEdit control's parent window that a gesture has been recognized. This is sent in a WM_NOTIFY message with the following parameters.
Parameters:
wParamSpecifies the identifier of the control that sent the message.
lParamSpecifies a pointer to the IEC_GESTUREINFO structure.
Return values:
The client returns 0 to accept the gesture and 1 to cancel the gesture.
IECN_RECOGNITIONRESULT
Notifies the InkEdit control's parent window that recognition has occurred. This is sent in a WM_NOTIFY message with the following parameters.
Parameters:
wParamSpecifies the identifier of the control that sent the message.
lParamSpecifies a pointer to the IEC_RECOGNITIONRESULTINFO structure.
Return values:
The client returns 0 if it processes the message.

Applies To

IEC_GESTUREINFO Structure (Win32 Only)

IEC_STROKEINFO Structure (Win32 Only)

IEC_RECOGNITIONRESULTINFO Structure (Win32 Only)

MousePointer Property

InkEditStatus Enumeration

InkInsertMode Enumeration

InkMode Enumeration

IInkCursor Interface

InkDrawingAttributes Class

IInkRecognitionResult Interface

IInkRecognizer Interface

InkDisp Class

IInkGesture Interface