Spellex SDK for ActiveX - Technical Support
Problem: When checking a text control using Spellex ActiveX's
TextControlHWnd property, misspelled words in the control are not
highlighted correctly or replacements are not made correctly when
misspelled words are corrected. For example, highlighting might start
before the misspelled word and end in the middle of it.
Discussion: Spellex ActiveX communicates with text controls to
highlight words, replace words, and obtain the text by sending
messages to the control. The type and format of the messages varies
depending on the control type. To determine the type of control,
Spellex ActiveX checks its window class name (a name assigned by the control
creator). If Spellex ActiveX knows the control's window class name, messages
it sends to the control will be correct and no problems will occur.
However, if the class name is unknown to Spellex ActiveX, it will attempt to
"guess" the type of control. Sometimes Spellex ActiveX will guess
incorrectly and various problems can arise. Spellex ActiveX knows the class
names of controls which are part of the Windows common controls
(i.e., which are part of the Windows operating system). Sometimes,
new controls with additional behavior are created from existing
common controls. Spellex ActiveX can deal with these controls, but doesn't
know how to because their window class names are unknown. This
document describes a way to tell Spellex ActiveX which underlying common
control a new control is based on.
The solution is to map the new control's window class name to the
class name of the underlying common control. To do this you will need
two pieces of information: 1) The window class name of the control
you are using; 2) the window class name of the common control on
which your control is based. The people who support your development
environment should be able to provide this information.
To define the map, create a string value in the following tree in the
Give the string value the same name as the new control's window class
name. Set the value to the class name of the underlying common
control. For example, if the new control's window class name is
"ATL:SAP TextEditBody", and that control is based on the
RichEdit20A common control, create a string value like this:
ATL:SAP TextEditBody = "RichEdit20A"
Note that you will need to create this string value in the registry
on all systems on which your application is installed.
If the control is not based on an underlying common control,
Spellex ActiveX with a third-party edit control for help.