Spell Checker ( Windows internal )

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Spell Checker ( Windows internal )

Post 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 :?:
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Spell Checker ( Windows internal )

Post 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 :D
have fun
Jimmy
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Spell Checker ( Windows internal )

Post 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 :D
Thx, but IMHO it should be: SendMessage( Form_1.RichEditBox_1.Handle, EM_SETLANGOPTIONS, 0, IMF_SPELLCHECKING )
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Spell Checker ( Windows internal )

Post 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
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Spell Checker ( Windows internal )

Post 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" :)
have fun
Jimmy
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Spell Checker ( Windows internal )

Post by edk »

IMHO better use hb_BitOr( IMF_SPELLCHECKING, IMF_TKBAUTOCORRECTION ) intead of bOR( IMF_SPELLCHECKING, IMF_TKBAUTOCORRECTION )
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Spell Checker ( Windows internal )

Post 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

Code: Select all

#xtranslate bor     => hb_BitOr
have fun
Jimmy
Post Reply