Page 1 of 1
Spell Checker ( Windows internal )
Posted: Sun Nov 14, 2021 1:21 am
by AUGE_OHR
hi,
i have read about it in FiveWin Forum
https://forums.fivetechsupport.com/view ... =3&t=40805
IMF_SPELLCHECKING
Windows 8: If this flag is set, the rich edit control turns on spell checking. This option is turned off by default (0).
https://docs.microsoft.com/en-us/window ... angoptions
https://docs.microsoft.com/en-us/window ... angoptions
did someone have "test" it

Re: Spell Checker ( Windows internal )
Posted: Sun Nov 14, 2021 5:41 am
by AUGE_OHR
hi,
have used Sample c:\hmg.3.4.4\SAMPLES\Controls\RichEditBox\
and add
Code: Select all
#define WM_USER 1024
#define EM_GETLANGOPTIONS (WM_USER + 121)
#define EM_SETLANGOPTIONS (WM_USER + 120)
#define IMF_SPELLCHECKING 0x0800
and
Code: Select all
ON KEY F1 ACTION SendMessage( RichEditBox_1:hWnd, EM_SETLANGOPTIONS, 0, IMF_SPELLCHECKING )
now when run i press F1 and type something wrrroong ... and look what happens !
it is not a "real" Spellchecker but it seem to notice "wrong" Word

Re: Spell Checker ( Windows internal )
Posted: Sun Nov 14, 2021 4:59 pm
by edk
AUGE_OHR wrote: ↑Sun Nov 14, 2021 5:41 am
hi,
have used Sample c:\hmg.3.4.4\SAMPLES\Controls\RichEditBox\
and add
Code: Select all
#define WM_USER 1024
#define EM_GETLANGOPTIONS (WM_USER + 121)
#define EM_SETLANGOPTIONS (WM_USER + 120)
#define IMF_SPELLCHECKING 0x0800
and
Code: Select all
ON KEY F1 ACTION SendMessage( RichEditBox_1:hWnd, EM_SETLANGOPTIONS, 0, IMF_SPELLCHECKING )
now when run i press F1 and type something wrrroong ... and look what happens !
it is not a "real" Spellchecker but it seem to notice "wrong" Word
Thx, but IMHO it should be: SendMessage(
Form_1.RichEditBox_1.Handle, EM_SETLANGOPTIONS, 0, IMF_SPELLCHECKING )
Re: Spell Checker ( Windows internal )
Posted: Sun Nov 14, 2021 10:23 pm
by AUGE_OHR
hi,
edk wrote: ↑Sun Nov 14, 2021 4:59 pm
Thx, but IMHO it should be: SendMessage(
Form_1.RichEditBox_1.Handle, EM_SETLANGOPTIONS, 0, IMF_SPELLCHECKING )
ooohh sorry,
i have take FiveWin Original Syntax instead of HMG Version
Re: Spell Checker ( Windows internal )
Posted: Mon Nov 15, 2021 6:45 am
by AUGE_OHR
more "Flags"
Code: Select all
#define IMF_TKBAUTOCORRECTION 0x2000
https://docs.microsoft.com/en-us/window ... angoptions
IMF_TKBAUTOCORRECTION
Windows 8: If this flag is set, enable touch keyboard autocorrect. This option is turned off by default (0).
Code: Select all
SendMessage( GetControlhandle( cControl, cForm ) , EM_SETLANGOPTIONS, 0, bOr(IMF_SPELLCHECKING, IMF_TKBAUTOCORRECTION) )
---
"Spell Check" use "your Language" so i have test it with German Language.
it does NOT "auto-correct" wrong Word (need to be "identify") but "known" Word like "geld" (Money) are "correct" into "Geld"

Re: Spell Checker ( Windows internal )
Posted: Mon Nov 15, 2021 9:45 am
by edk
IMHO better use hb_BitOr( IMF_SPELLCHECKING, IMF_TKBAUTOCORRECTION ) intead of bOR( IMF_SPELLCHECKING, IMF_TKBAUTOCORRECTION )
Re: Spell Checker ( Windows internal )
Posted: Mon Nov 15, 2021 10:38 am
by AUGE_OHR
edk wrote: ↑Mon Nov 15, 2021 9:45 am
IMHO better use hb_BitOr( IMF_SPELLCHECKING, IMF_TKBAUTOCORRECTION ) intead of bOR( IMF_SPELLCHECKING, IMF_TKBAUTOCORRECTION )
oooohh, sorry again
it is my Xbase++ Style to use bOr which i use under HMG this Way