IE_DOCOMMAND

Causes an ink edit control to execute a command.

Parameters

wParam

Contains one of the following command message codes:

Constant

Description

IEM_CLEAR

Clear (delete) the selection.

IEM_COPY

Copy selected strokes.

IEM_CUT

Cut selected strokes.

IEM_ERASE

Use eraser mode to erase.

IEM_LASSO

Use lasso mode to select strokes.

IEM_PASTE

Paste Clipboard contents to the iedit control.

IEM_PROPERTIES

Invoke the properties dialog box on the selected strokes.

IEM_RESIZE

Resize selected strokes.

IEM_SELECTALL

Select all the strokes in the control.

IEM_UNDO

Undo the last action.

 

lParam

Not used; must be 0.

Return Value

Returns IER_OK if successful; otherwise, returns one of the following:

Constant

Description

IER_PARAMERR

wParam or lParam is invalid.

IER_MEMERR

A memory error occurred.

IER_SECURITY

The control has security protection disallowing the operation.

 

Comments

An application can use this message to force the ink edit control to execute a valid command. For example, an application might have a toolbar button or menu item that can be used to trigger a copy command. The IE_DOCOMMAND message can be used in response to the user s pressing the button or selecting the menu item to have the iedit control copy the selected ink to the Clipboard.

The iedit control sends its parent an IN_COMMAND notification if the IEN_EDIT notify bit is set, to which the parent can respond in the usual ways. Sending a command that the iedit control cannot interpret (that is, a command code of IEM_USER or above) causes any specified notification but the iedit control takes no other action.

The IEN_EDIT bit is set by default. It should be cleared if the control s parent does not want to receive the IN_COMMAND notification message.

See Also

IE_GETCOMMAND