Freigeben über


GetGestureStatus Method [InkPicture Control]

GetGestureStatus Method [InkPicture Control]

Returns a value that indicates whether the InkPicture control has interest 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.

Return Value

This method returns a value that indicates the interest of the InkPicture control in a known application gesture.

Value Description
TRUE The InkPicture control has interest in the gesture and the Gesture event of the InkPicture control fires when the gesture is recognized.
FALSE the InkPicture control has no interest in the gesture. The strokes that were recognized as a gesture remain as IInkStrokeDisp objects.
HRESULT value Description
S_OK Success.
E_POINTER A parameter contained an invalid pointer.
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 IAG_AllGestures.

To set the interest of the the InkPicture control in a particular gesture, call the InkPicture::SetGestureStatus method.

Note: By default, the InkPicture control does not have interest in any application gesture.

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 InkPicture object, theInkPicture. The example then displays a message box containing the value TRUE.

[Visual Basic]
Dim theInkPicture As InkPicture

Private Sub Form_Load()
    Set theInkPicture = New InkPicture
    theInkPicture.hWnd = Me.hWnd
    theInkPicture.Enabled = True
    theInkPicture.SetGestureStatus IAG_ArrowLeft, True
    MsgBox theInkPicture.GetGestureStatus(IAG_ArrowLeft)
End Sub

Applies To