GetGestureStatus Method [InkEdit Control]
GetGestureStatus Method [InkEdit Control] |
Returns a value that indicates whether the InkEdit control is interested in a particular application gesture.
Declaration
[C++]
[C++]
HRESULT GetGestureStatus (
[in] InkApplicationGesture gesture,
[out, retval] VARIANT_BOOL *Listening
);
[Microsoft® Visual Basic® 6.0]
[Visual Basic]
Public Function GetGestureStatus( _
gesture As InkApplicationGesture _
) As Boolean
Parameters
gesture
[in] The gesture that you want the status of.
*Listening
[out, retval] A value that indicates the interest of the InkEdit control in a known application gesture.
Value | Description |
---|---|
True | The InkEdit control has interested in the gesture and the Gesture event of the InkEdit control fires when the gesture is recognized. |
False | The InkEdit control has no interested in the gesture. |
Return Value
HRESULT value | Description |
---|---|
S_OK | Success. |
E_POINTER | Input parameter was incorrect. |
E_INK_INVALID_MODE | Collection mode must be in gesture-mode. |
E_OUTOFMEMORY | Cannot allocate memory to perform action. |
E_INK_EXCEPTION | An exception occurred. |
E_INVALIDARG | The flag is invalid. |
Remarks
This method throws an exception if the gesture parameter is set to the IAG_AllGestures gesture.
To set the interest of the the InkEdit control in a particular gesture, call the InkEdit::SetGestureStatus method.
Note: By default, the InkEdit control has interest in the following gestures:
Example
[Visual Basic 6.0]
This Visual Basic 6.0 example sets and then tests the interest status for the IAG_ArrowLeft gesture on the InkEdit object, theInkEdit, and then displays a message box containing the value True.
Private Sub Form_Load()
theInkEdit.hWnd = Me.hWnd
theInkEdit.Enabled = True
theInkEdit.SetGestureStatus IAG_ArrowLeft, True
MsgBox theInkEdit.GetGestureStatus(IAG_ArrowLeft)
End Sub