Can't get HunSpell to work C++ Builder
Posted: Sun Apr 23, 2023 5:24 pm
Hi
I'm using C++ Builder 11.3, TRichView 20.3
I have put the hunspelldll.dll in the in the same folder as my .exe, en_GB.dic also in that folder.
I call Speller->LoadAllDictionaries(); when my form opens. The debuggers shows it creates a TDictionary item in the TDictionaries collection.
But Speller->Check(RichViewEdit1, rvesFromStart); flags every word as wrong and offers no suggestions.
I downloaded the dictionary file from https://cgit.freedesktop.org/libreoffic ... es/tree/en (which is where the HunSpell (https://hunspell.github.io) points to. I suspect this is the error as it is full of html and other non-dictionary things. But I don't know what the format should be...
Any suggestions would be appreciated.
Andy
This is my code:
I'm using C++ Builder 11.3, TRichView 20.3
I have put the hunspelldll.dll in the in the same folder as my .exe, en_GB.dic also in that folder.
I call Speller->LoadAllDictionaries(); when my form opens. The debuggers shows it creates a TDictionary item in the TDictionaries collection.
But Speller->Check(RichViewEdit1, rvesFromStart); flags every word as wrong and offers no suggestions.
I downloaded the dictionary file from https://cgit.freedesktop.org/libreoffic ... es/tree/en (which is where the HunSpell (https://hunspell.github.io) points to. I suspect this is the error as it is full of html and other non-dictionary things. But I don't know what the format should be...
Any suggestions would be appreciated.
Andy
This is my code:
Code: Select all
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit11.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "RichView"
#pragma link "RVEdit"
#pragma link "RVScroll"
#pragma link "RVStyle"
#pragma link "RVUniscribeGrIn"
#pragma link "RVHunSpell"
#pragma resource "*.dfm"
TForm11 *Form11;
//---------------------------------------------------------------------------
__fastcall TForm11::TForm11(TComponent* Owner) : TForm(Owner) {
}
//---------------------------------------------------------------------------
void __fastcall TForm11::FormShow(TObject *Sender)
{
Speller->LoadAllDictionaries();
}
//---------------------------------------------------------------------------
void __fastcall TForm11::Button1Click(TObject *Sender)
{
Speller->Check(RichViewEdit1, rvesFromStart);
}
//---------------------------------------------------------------------------