Freigeben über


CommitPendingInput Method

CommitPendingInput Method

Sends collected ink to the recognizer and posts the recognition result.

Declaration

[C++]

HRESULT CommitPendingInput();

[Microsoft® Visual Basic® 6.0]

Public Sub CommitPendingInput()

Parameters

This method takes no parameters.

Return Value

HRESULT value Description
S_OK Success.
E_UNEXPECTED Unexpected parameter or property type.
E_FAIL An unspecified error occurred.

Remarks

The writing pad sends the collected ink to the recognizer and clears the writing pad. The East Asian multibox sends recognized characters and clears multiboxes. The recognition result is sent to the control to which the PenInputPanel object is attached.

If there is no pending input or the CurrentPanel property is Keyboard, CommitPendingInput does nothing. If the PenInputPanel object is inactive, calling this method generates an error.

Examples

[Visual Basic 6.0]

This Visual Basic 6.0 example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, InkEdit1. It adds a VisibleChanged event handler, VisibleChanged_Event, to the form for the PenInputPanel. In the event handler, if the pen input panel has become invisible, any pending input is sent to the recognizer by calling the CommitPendingInput method.

' Declare a new PenInputPanel object
Dim WithEvents thePenInputPanel As PenInputPanel

Private Sub Form_Load()
  ' Create the PenInputPanel
  Set thePenInputPanel = New PenInputPanel

  ' Attach the PenInputPanel to an InkEdit control
  thePenInputPanel.AttachedEditWindow = InkEdit1.hWnd

End Sub

Private Sub thePenInputPanel_VisibleChanged( _
                  ByVal NewVisibility As Boolean)
  If Not NewVisibility Then
    thePenInputPanel.CommitPendingInput
  End If
End Sub

Applies To