Zur Startseite

JRSpellChecker

Zur Homepage

SpellCheckWords(ByVal xhwnd As Long, ByVal Startpos As Long, ByVal controllltype As Bindto) As Boolean

Function:

check the document up from this position.
You can use this function, to build your own correction dialogue.

         

ico_syntax Syntax:

JRSpell1.SpellCheckWords x.hwnd, startpos, xtype

x.HWND

HWND of the RTF-Control, the textbox or the TX-Textcontrol

x.type

xRtf_Control=1, xText_Box=2, xTX_Textcontroll=3; NetRtf_Control=11

startpos

start position

ico_weitere Return value:


if startpos <> 0 then a incorrect word was found. The begin of the word is the startpos value.

Fires the SpellCheckWord event.

Example:

    Private Sub CheckWords()
      'Demo How to Add a user-defined Dialog
      'clear all marks
      JRSpell1.ClearAllSelections RichTextBox1.hWnd, Rtf_Control
     
    countwords = 0
     
    mystartpos& = 0
    searchnext:
      JRSpell1.SpellCheckWords RichTextBox1.hWnd,
    mystartpos&, Rtf_Control
      'if a incorrect Word was found, then show a Dialog
      If
    mystartpos& > 0 Then
        MsgBox
    lastincorrectword$
        GoTo
    searchnext
      Else
        'clear all marks
        JRSpell1.ClearAllSelections RichTextBox1.hWnd, Rtf_Control
      End If
    End Sub

    Private Sub JRSpell1_SpellCheckWord(CheckedWord As String, SpellChecked As Boolean)
    If SpellChecked = False Then
     
    lastincorrectword$ = CheckedWord
    End If
    End Sub