Here is an example of using an InkEdit control in "inkless mode" as a Unicode-aware RichTextBox.
But on Windows 8 and later there is more!
The program turns on the built-in Windows spellcheck capabilities of RichEdit version 8, which lives inside the InkEdit control when running on current versions of Windows.
![Name: sshot.png
Views: 160
Size: 6.2 KB]()
Imagine that. Free spellcheck!
Requirements
Windows 8 or later.
But on Windows 8 and later there is more!
The program turns on the built-in Windows spellcheck capabilities of RichEdit version 8, which lives inside the InkEdit control when running on current versions of Windows.
Code:
Private Const WM_USER As Long = &H400&
Private Const EM_SETLANGOPTIONS As Long = WM_USER + 120&
Private Const IMF_SPELLCHECKING As Long = &H800&
Private Const IMF_TKBPREDICTION As Long = &H1000&
Private Const IMF_TKBAUTOCORRECTION As Long = &H2000&
Private Const EM_SETEDITSTYLE As Long = WM_USER + 204&
Private Const SES_USECTF As Long = &H10000
Private Const SES_CTFALLOWEMBED As Long = &H200000
Private Const SES_CTFALLOWSMARTTAG As Long = &H400000
Private Const SES_CTFALLOWPROOFING As Long = &H800000
Private Declare Function SendMessage Lib "user32" Alias "SendMessageW" ( _
ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) As Long
Private Sub Form_Load()
With InkEdit1
SendMessage .hWnd, _
EM_SETLANGOPTIONS, _
0, _
IMF_SPELLCHECKING _
Or IMF_TKBPREDICTION _
Or IMF_TKBAUTOCORRECTION
SendMessage .hWnd, _
EM_SETEDITSTYLE, _
SES_USECTF _
Or SES_CTFALLOWEMBED _
Or SES_CTFALLOWSMARTTAG _
Or SES_CTFALLOWPROOFING, _
SES_USECTF _
Or SES_CTFALLOWEMBED _
Or SES_CTFALLOWSMARTTAG _
Or SES_CTFALLOWPROOFING
End With
End Sub
Imagine that. Free spellcheck!
Requirements
Windows 8 or later.