Compartir a través de


InkEdit Messages (Win32 Only)

InkEdit Messages (Win32 Only)

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

Messages

[C++]

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

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

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:

wParam

Specifies 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.

lParam

This 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:

wParam

Specifies one of the values of the InkInsertMode enumeration, which specifies whether ink is inserted into the control as text or as ink.

lParam

This 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:

wParam

This parameter is not used; it must be 0.

lParam

Specifies 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:

wParam

This parameter is not used; it must be 0.

lParam

Specifies 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:

wParam

Specifies the recognition timeout, in milliseconds.

lParam

This 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:

wParam

Specifies the type of gesture, as defined in the InkApplicationGesture enumeration.

lParam

This 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:

wParam

Specifies the type of gesture, as defined in the InkApplicationGesture enumeration.

lParam

Specifies 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:

wParam

This parameter is not used; it must be 0.

lParam

Specifies 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:

wParam

This parameter is not used; it must be 0.

lParam

Specifies the IInkRecognizer * to use for subsequent recognition.

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:

wParam

This parameter is not used; it must be 0.

lParam

Specifies 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:

wParam

This parameter is not used; it must be 0.

lParam

Specifies 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:

wParam

This parameter is not used; it must be 0.

lParam

Specifies 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:

wParam

This parameter is not used; it must be 0.

lParam

Specifies 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:

wParam

This parameter is not used; it must be 0.

lParam

Specifies 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:

wParam

This parameter is not used; it must be 0.

lParam

Specifies 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:

wParam

Specifies 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.

lParam

Specifies 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:

wParam

This parameter is not used; it must be 0.

lParam

Contains 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:

wParam

This parameter is not used; it must be 0.

lParam

Contains 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:

wParam

Specifies a Boolean value that determines whether to treat mouse input as pen input.

lParam

This 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:

wParam

Specifies the identifier of the control that sent the message.

lParam

Specifies 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:

wParam

Specifies the identifier of the control that sent the message.

lParam

Specifies 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:

wParam

Specifies the identifier of the control that sent the message.

lParam

Specifies a pointer to the IEC_RECOGNITIONRESULTINFO structure.

Return values:

The client returns 0 if it processes the message.

Applies To