Wintertree Software Inc.

Sentry Spelling Checker Engine

Home Site index Contact us Catalog Shopping Cart Products Support Search

You are here: Home > Support > Sentry Spelling Checker Engine > FAQ


Sentry Spelling Checker Engine Windows SDK

Frequently asked support questions

Contents:


Questions about dictionaries

D1. How do I add words to a custom dictionary?

Use the SSCE_CreateLex function to create a new dictionary file. Use the SSCE_AddToLex function to add words from within your application at run time. You can also display the Dictionaries dialog box and use it to add words to a dictionary file.

D2. How do I add words to a user dictionary?

Use the SSCE_CreateLex function to create a new dictionary file. Use the SSCE_AddToLex function to add words from within your application at run time. You can also display the Dictionaries dialog box and use it to add words to a dictionary file.

D3. How do I add words to the dictionary?

The way this is done using Sentry is to create a custom dictionary file and add your words to it. The custom dictionary file should be included in the MainLexFiles property. When checking spelling, Sentry searches all of the dictionary files listed in MainLexFiles (and UserLexFiles). By adding your custom dictionary to MainLexFiles, you are essentially extending the main dictionary with your words.

D4. How do I build or create a compressed dictionary?

 See "How to create compressed lexicons" in the "Using the Sentry Windows SDK" chapter of the Sentry programmer's guide. If you want to create compressed dictionaries at run time from your application, see "How to create compressed lexicons" in the "Using Sentry's Core API" chapter.

D5. How do I create a temporary lexicon?

If you want to create a temporary lexicon for your own purposes, call SSCE_CreateLex.

If you use the built-in dialog boxes or the SSCE_GetSid function, a temporary lexicon is created automatically. The temporary lexicon is used to hold "ignore all" and "change all" words. If you want to access this temporary lexicon, call SSCE_GetLexId.

D6. How do I edit a user dictionary?

If you want to change the contents of a user dictionary at run time from your application, call SSCE_AddToLex, SSCE_DelFromLex, and SSCE_GetLex.

User dictionaries can be edited through the Dictionaries dialog box. See also: How do I access a dictionary listed in UserLexFiles?

D7. How do I find out which dictionary file contains a word?

The recommended approach is to call SSCE_FindLexWord on each open dictionary until it returns a non-negative result.

D8. How do I remove words from a main dictionary?

The easiest method is to define a custom dictionary and add words with the "Exclude" action (SSCE_EXCLUDE_ACTION) to it.

The custom dictionary containing excluded words must be opened before other main dictionary files, meaning it should appear first in MainLexFiles.

The only way to physically remove words from a .clx (compressed lexicon) file is to obtain the word list used to create it, edit the word list to remove the words, then re-compress the word list. The word lists used to create Wintertree Software's dictionaries are sold separately.

D9. How do I remove words from a user dictionary?

See How do I edit a user dictionary?

D10. How do I import words into a user dictionary?

Call SSCE_AddToLex to add each word to the user dictionary. Use SSCE_GetLexId to obtain the lexicon id of the dictionary.

D11. How do I change the main dictionary language?

Users can select a different dictionary language through the "Main Dictionary Language" drop-down list in the Options dialog box. The list shows the languages of dictionaries installed on the system in the MainLexPath property.

To change the main dictionary language at run time from your application, call SSCE_SetMainLexFiles.

If you open dictionary files explicitly in your application, close the current set of main dictionary files (using SSCE_CloseLex), then open the new set (using SSCE_OpenLex).

D12. How do I read the contents of a .clx (compressed lexicon) file?

There is no way to read compressed lexicons directly. Compressed lexicon (.clx) files are in a complex binary format, and the Sentry API provides no means of reading them.

You can purchase the word lists used to create Wintertree Software's dictionaries. Word lists are text files containing the words in a dictionary. Word lists are like "source code" for the dictionaries.

D13. How do I use a Microsoft Word/Office dictionary?

 Sentry can use the user dictionary (usually named custom.dic) created by Microsoft Word/Office. See Using user dictionaries from Word (and other applications) for instructions. Note that Sentry cannot use Word's (or any other application's) main dictionary for technical and legal reasons.

D14. Can I associate extra information with words in a dictionary?

Text lexicons (.tlx files) associate an action and another word with each word they contain. You can use the other word to associate additional information, such as mapping one word to another, mapping a word to a small set of synonyms, mapping a part number to a name, etc. Up to 80 characters can be associated with each word.

Add the words and associated information to a text lexicon using SSCE_AddToLex (see How do I add words to a user dictionary? for more information). Use SSCE_AUTO_CHANGE_ACTION or SSCE_CONDITIONAL_CHANGE_ACTION.

Use SSCE_CheckWord, SSCE_CheckBlock, or SSCE_CheckString to check your text.

When the SSCE_Check* function returns SSCE_AUTO_CHANGE_WORD_RSLT (or SSCE_CONDITIONALLY_CHANGE_WORD_RSLT), the otherWord parameter will contain the associated information.

It is not possible to use this approach with compressed lexicons.

See also: How do I expand abbreviations?

D15. What's the difference between a dictionary and a lexicon?

There are no differences. The terms are interchangeable. We prefer the term "lexicon" since "dictionary" suggests words including definitions. However, many customers are more comfortable with "dictionary," so both terms are used.

D16. What's the difference between a main and user lexicon?

Main dictionary files are read only. They can't be modified at run time (though the .tlx files forming part of the main dictionary can be modified "off line"). User dictionary files are intended to be modified at run time.

Main dictionary files do not appear in the "Add words to" drop-down list in the spelling dialog box, whereas user dictionary files do. Main dictionary files do not appear in the Dictionaries dialog box, whereas user dictionary files do.

The Sentry DLL uses the MainLexFiles and UserLexFiles properties to determine whether a given file is a user dictionary or main dictionary. To make a dictionary read-only (to prevent users from updating it) add it to MainLexFiles instead of UserLexFiles.

D17. How are the dictionary file names encoded?

See "About Sentry's lexicons" in the "Using Sentry's Core API" chapter of the Sentry programmer's guide.

D18. What is the text lexicon (.tlx) file format?

See "About the text lexicon file format" in the "Using Sentry's Core API" chapter of the Sentry programmer's guide.

D19. Is ssceam.tlx (or sscebr.tlx or ssceca.tlx) a main dictionary or user dictionary?

ssceam.tlx is part of the main American English dictionary. It should be listed in the MainLexFiles property, and should not be listed in UserLexFiles (similarly for sscebr.tlx and ssceca.tlx).

See "About Sentry's lexicons" in the "Using Sentry's Core API" chapter of the Sentry programmer's guide for more information.

D20. Do I have to call SSCE_OpenLex?

No. You can set the MainLexFiles and UserLexFiles properties, and the Sentry DLL will open dictionaries automatically.

You can access the session under which the dictionaries are automatically opened using SSCE_GetSid.

If you open your own session using SSCE_OpenSession, you will have to open lexicons explicitly using SSCE_OpenLex.

See Do I have to call SSCE_OpenSession? for more information.

D21. How do I access a dictionary listed in UserLexFiles?

Use SSCE_GetLexId to obtain the lexicon id of the dictionary, then use one of the functions in Sentry's Core API to manipulate the dictionary's contents (see How do I add words to a user dictionary?).

D22. How do I prevent Sentry from ignoring or changing words from a previous spelling check?

When the user clicks the Ignore All or Change All buttons in the built-in spelling dialog box, the Sentry DLL adds the words to a temporary dictionary. The contents of the temporary dictionary are not automatically cleared between spelling checks. You can clear the contents of the temporary dictionary by calling SSCE_ResetLex.

D23. I looked at ssceam.tlx (or sscebr.tlx, etc.) with Notepad, and it only contains about 1000 words. I thought the dictionary was supposed to contain 100,000 words. Where are the rest?

The file ssceXX.tlx (e.g., ssceam.tlx) is a text-format lexicon (dictionary) that contains the most common words in a given language. Text-format lexicons can be accessed more quickly than large compressed dictionaries. The file ssceam.tlx contains very common American English words like the, of, is, and, etc. These common words are located quickly in ssceam.tlx so they don't have to be located in ssceam2.clx, which is a large compressed lexicon containing about 100,000 words. Both files should be opened, and ssceam.tlx should be opened first. For more information, see "About SSCE's lexicons" in the "Introduction" chapter of the SSCE Programmer's Guide.

D24. How can I prevent users from adding words to a user dictionary?

The short answer: List any dictionary files you don't want the user to modify in MainLexFiles instead of UserLexFiles.

The long answer: The Sentry DLL divides dictionary files into two types: Main and User. User dictionaries are intended to contain words that are personal to a specific user, such as the user's family name. Main dictionaries are intended to be read-only, and are not made available for the user to update. The distinction between the different dictionary types is made based on whether the dictionary files are listed in MainLexFiles or UserLexFiles. Dictionaries listed in UserLexFiles appear in the "Add words to:" drop-down list in the spelling-checker dialog box, and are listed in the "Files" drop-down list in the dictionaries dialog box. The user can modify these dictionaries by clicking the "Add" or "Add word" buttons. Dictionaries listed in MainLexFiles do not appear in either drop-down list, and are therefore inaccessible to the user.

See What's the difference between a main and user lexicon? for more information.

D25. I notice that the language codes listed in the Sentry Programmer's Guide (and ssce.h, ssce.bas, and ssce.pas, etc.) contain codes for languages like Russian and Polish, but you don't have dictionaries for these languages listed in your catalog. Will these languages be made available?

The language codes listed in ssce.h, etc., are there for the benefit of our customers who may have their own word lists. There is no relationship between the language codes and Wintertree Software's product line.

D26. I looked at userdic.tlx or correct.tlx with Notepad, and saw that each word is followed by a letter like "i" or "c". What do these mean?

The format of text lexicons (dictionaries) is documented in "About the text lexicon file format" under "How to add words to text lexicons" in the "Using Sentry's Core API" chapter of the Sentry Programmer's Guide.


Installation on Target Systems

I1. How do I set up Sentry on the end-user's system?

See "How to Install the Sentry Run-time Software with your Applications" in the "Using the Sentry Windows SDK" chapter of the Sentry Programmer's Guide for an overview of the procedure.

Note that in most cases, you must set the MainLexPath and MainLexFiles properties on the end-user's system (applications that call SSCE_OpenLex explicitly are the exception). MainLexPath and MainLexFiles are set up automatically on your development system when you install the Sentry SDK. Your installation/setup program is responsible for making these settings on your end user's system. Most installation/setup programs can create or change registry keys and INI files, and this is the recommended way to set MainLexPath and MainLexFiles. Consult your installation/setup program's documentation for instructions.

I2. How do I make the Sentry DLL read settings from HKEY_LOCAL_MACHINE instead of HKEY_CURRENT_USER?

Call SSCE_SetRegTreeName, and prefix the registry key with HKEY_LOCAL_MACHINE like this:

SSCE_SetRegTreeName("HKEY_LOCAL_MACHINE\Software\myco\myapp")

I3. How do I make the Sentry DLL use an INI file rather than the registry?

The Sentry DLL will read and write settings from and to the INI file you specify after you call SSCE_SetIniFile. You should call SSCE_SetIniFile each time your application runs, before calling any other Sentry functions. After SSCE_SetIniFile is called, the Sentry DLL will continue accessing properties through the INI file until SSCE_SetRegTreeName is called.

I4. How do I make the Sentry DLL read settings from my app's registry tree?

Call SSCE_SetRegTreeName.

I5. How do I install Sentry on a network?

The Sentry DLL can be placed on a network drive if the directory it is in is listed in each client's PATH setting, or if it is located in the same directory as the application's .exe file.

Main dictionary files can be located on a network drive if the each client's MainLexPath property points to the network directory containing them. The path can use mapped drive letters or UNC names (the path you provide is simply passed to Windows, so whatever is acceptable to Windows will work for dictionary files).

Updateable user dictionaries should not be shared by users on a network. A misspelled word added to a shared dictionary by one use will compromise the effectiveness of the spelling checker for all users. Instead, we recommend that each user have his or her own user dictionary, and submit global words to an administrator who adds them to a shared, read-only custom dictionary. See Sharing dictionaries across a network for more information.

I6. What files can I install on my end user's system?

 The License Agreement (Start + Programs + Sentry Spelling Checker Engine + License Agreement) specifies which files you are permitted to install on your end-user's system.

I7. Do I have to register the Sentry DLL?

No. The Sentry DLL will be located by Windows if it is placed in the a folder listed in the PATH environment variable (such as the System32 directory) or in the same directory as an application which uses it.

I8. Can I install the Sentry Windows SDK on an end-user's system?

Your application doesn't need the entire SDK at run time, only certain portions (namely, the Sentry DLL and dictionary files). Your application also needs to set the MainLexPath and MainLexFiles properties so the Sentry DLL can find the dictionaries.

You can install the Sentry Windows SDK on an end-user's system only if you purchase one copy of the SDK for each end user.

I9. How can I set up my application so an administrator installs it but it can be used by all users on that machine?

The HKEY_CURRENT_USER registry tree is an alias for the logged in user's registry tree. If User X installs your application and your application uses HKEY_CURRENT_USER, then only User X will be able to use your application. HKEY_LOCAL_MACHINE, on the other hand, is available to all users.

Have your application call SSCE_SetRegTreeName and specify HKEY_LOCAL_MACHINE as the top-level tree (see How do I make the Sentry DLL read settings from HKEY_LOCAL_MACHINE instead of HKEY_CURRENT_USER?)

Have your setup program create MainLexPath, MainLexFiles, and any other Sentry-specific values in HKEY_LOCAL_MACHINE. Alternatively, if your application sets Sentry properties by calling functions such as SSCE_SetMainLexPath, do so after calling SSCE_SetRegTreeName.

I10. The Sentry license agreement states I have to publish a copyright notice with my application. Where should this go?

You can place the copyright notice in any reasonably visible location: With other copyright notices (including your own), in your application's help file, splash screen, about box, printed user's manual, etc.

I11. When I run my application on my development system, the spelling checker works great. But when I run my application on a customer's system, every word is reported as misspelled. Why?

You are responsible for configuring the Sentry DLL (by defining properties in the system registry or INI file) on your end user's systems. The setup program included with Sentry Windows SDK does this for you on your development system.

Please see Most or all words reported as misspelled for more information.


Miscellaneous Questions

M1. How do I change Sentry options at run time?

Users can change some options through the Options dialog box.

To change options from your application, call SSCE_SetOption. Pass the session id returned by SSCE_GetSid (unless your application opens its own session using SSCE_OpenSession).

Option properties will not be updated until the Sentry DLL is unloaded (which happens when your application exits).

If your application modifies an option property (e.g., by changing the INI file or system registry), the change won't take effect until the Sentry DLL is next loaded.

Only options changed in the session returned by SSCE_GetSid will be reflected in the option properties (i.e., if you call SSCE_SetOption with a session id opened via SSCE_OpenSession, you must take responsibility for saving the option settings).

M2. How do I check the validity of part numbers or other codes?

You can use Sentry to quickly validate codes such as part numbers, user ids, ZIP codes, etc. by checking that they exist in a dictionary.

Create a text file containing the codes, one code per line. If your text file contains more than 5000 lines, consider compressing it (see How do I build or create a compressed dictionary?).

Open the text file (or compressed lexicon) using SSCE_OpenLex. Call SSCE_CheckWord to validate a code against the dictionary of codes.

M3. How do I count words?

Call SSCE_CountStringWords to count the words in a string.

See "How to check spelling of a string of words" in the "Using Sentry's Core API" chapter of the Sentry programmer's guide for the rules used to identify words within a string.

M4. How do I expand abbreviations?

Add the abbreviations and expansions to a custom dictionary with the SSCE_AUTO_CHANGE_ACTION or SSCE_CONDITIONAL_CHANGE_ACTION.

Include the custom dictionary in the MainLexFiles property (or open it explicitly using SSCE_OpenLex).

If your application calls SSCE_CheckBlockDlg, SSCE_CheckCtrlBackground, or SSCE_CheckCtrlDlg, the abbreviation expansion will happen automatically (or conditionally).

If your application calls SSCE_CheckBlock, SSCE_CheckWord, or SSCE_CheckString, the result bit-mask from these functions will contain SSCE_AUTO_CHANGE_WORD_RSLT (or SSCE_CONDITIONAL_CHANGE_WORD_RSLT) when an abbreviation is encountered. The otherWord parameter will contain the abbreviation's expansion.

M5. How do I find words using wildcards?

Sentry's API provides no means of searching using wildcards. If you want to locate words using a wildcard in a single character position, substitute each letter for the wildcard character and call SSCE_CheckWord to determine if the result matches a known word.

Example: For b?ll, try ball, bbll, bcll... bzll. With the American English dictionary open, SSCE_CheckWord will match ball, bell, bill, boll, and bull.

M6. How do I generate a random word?

Sentry's API provides no means of selecting random words directly, but you can use this technique. Generate a random string of letters roughly equal in length to the length of the word you want, or of a random length if the length isn't important. For best results, your random string should contain at least four characters.

If you want random words starting with a specific letter, make your random string start with that letter. Generally, if you want your random word to have any particular characteristics (e.g., end in ing, vowel in the second position, etc.), give the random string the same characteristics.

Pass the random string to the SSCE_Suggest function. If you want the random word to closely resemble the random string, use a low depth value.

Chose one of the resulting suggestions as the random word. Some of the suggestions may be acronyms or abbreviations (all caps), and some may be proper nouns (start with a capital). You may want to exclude these if they aren't suitable for your purpose. You may have to call SSCE_Suggest several times with different random strings to obtain a random word with the right characteristics.

M7. How do I look up suggestions?

See "How to look up suggestions for misspelled words" in the "Using Sentry's Core API" chapter of the Sentry programmer's guide.

The built-in spelling dialog box locates and displays suggestions automatically.

M8. How do I use the Sentry DLL in a multi-threaded application?

Each thread should open its own session using SSCE_OpenSession. Each session is thread safe.

If threads must share sessions, the session must be treated as a critical resource. Access to the session must be serialized using a semaphore, mutex, etc. This is also true if the session id returned by SSCE_GetSid is shared.

See "About thread safety" in the "Using Sentry's Core API" chapter of the Sentry programmer's guide for more information.

M9. Do I have to call SSCE_OpenSession before calling SSCE_CheckBlockDlg, SSCE_CheckCtrlDlg, or SSCE_CheckCtrlBackground?

No. The Sentry DLL automatically opens a session and uses it when you call SSCE_CheckCtrlDlg, etc.

See also: Do I have to call SSCE_OpenSession? and Clarification: Differences between "Core API" and "Windows API"

M10. Can I statically link the Sentry engine into my application rather than calling it as a DLL?

The Sentry Windows SDK ships with a 32-bit STDCALL DLL. It does not include a static library you can link with your application. You could upgrade to the Sentry Source SDK, compile the source code, and statically link the object files with your application.

M11. I'm using SSCE_CheckCtrlDlg with TX Text Control (or some other third-party text control). Why doesn't it work?

Sentry DLL version 5.16 and later can be used directly with TX Text Control version 10 and later.

For older versions of the Sentry DLL or TX Text Control, or other types of text controls, see: Using SSCE_CheckCtrlDlg with a 3rd-party edit control. See also: Sentry Spelling Checker Engine Programmer's Guide: "Using the SSCE Windows API": "How to check an edit control or rich-edit control


 Questions about Spelling

S1. How do I check spelling as the user types, like in Word or Office?

 See "Checking rich-text controls in the background" in the "Using the Sentry Windows API" chapter of the Sentry programmer's guide.

S2. How do I check spelling in British (or UK or International) English?

When you install the Sentry Windows SDK on your development system, the registry is set up to use American English dictionaries. To use British English dictionaries, use regedit to set the MainLexFiles string value in the registry (HKEY_CURRENT_USER\Software\Wintertree\SSCE) to "sscebr.tlx,sscebr2.clx".

S3. How do I check spelling in languages other than English?

The Sentry DLL checks the spelling of words against the set of open dictionary files. Usually, the names of dictionary files are specified through the MainLexFiles property. To check the spelling of text in a different language, set MainLexFiles to the names of dictionary files containing words in that language.

You can purchase dictionaries in languages other than English from Wintertree Software. You may be able to obtain word lists from other sources and use them to create compressed dictionaries.

Place the dictionary file(s) in the directory indicated by the MainLexPath property.

See How do I change the main dictionary language? for further instructions.

If you are using Sentry's built-in dialog boxes, you may want to translate the text they display into another language. See How do I change the language of text in the built-in dialog boxes? for more information.

S4. How do I check spelling in multiple languages?

Ideally, your application should provide some means for the user to indicate which language text is entered in, and use main dictionaries specific to that language.

It's not a good idea to have dictionaries for more than one language open at the same time. Having dictionaries for two or more languages open at once increases the probability that a misspelled word in one language will match a valid word in the other language, and therefore will not be detected. Also, having two main dictionaries open at once will increase the time required to check spelling and look up suggestions.

If you cannot tell which language text was entered in, you could try checking a sample portion of the text against dictionaries for each language, one by one, and picking the language that results in the fewest spelling errors.

S5. How do I check spelling in an HTML form?

You can use Sentry to check spelling of text boxes in HTML forms if your Web server is IIS. See the Using Sentry Spelling Checker Engine in an ASP Application document (available in the "Sentry Spelling Checker Engine" folder in the Start menu) for more information.

The Sentry DLL was designed for use in desktop applications operated by a single user. Using Sentry in a server-based spelling checker is effective only if your server receives low traffic volume. Our Wintertree Spelling Server product is better suited to server-based spell-checking.

Browsers will generally not allow calls to DLLs on the client. You may be able to wrap the Sentry DLL in an ActiveX control or signed applet, but this is not tested or supported.

S6. How do I check the spelling of HTML?

When the IgnoreHTMLMarkups (SSCE_IGNORE_HTML_MARKUPS_OPT) option is enabled, Sentry will skip over any HTML markups encountered in the text.

S7. How do I check the spelling of multi-word phrases, such as names?

You can add multi-word phrases containing spaces to a custom dictionary.

Use SSCE_CheckWord to check multi-word phrases. The string passed to this function is treated as a single word, even if it contains spaces.

Sentry functions that check strings of words (SSCE_CheckBlock, SSCE_CheckString, SSCE_CheckBlockDlg, SSCE_CheckCtrlDlg, SSCE_CheckCtrlBackground) treat spaces as word separators, so these functions cannot be used to check multi-word phrases.

S8. How do I check the spelling of text in a text box or control?

See "How to check spelling in a text control or rich-text control" in the "Using the Sentry Windows API" chapter of the Sentry programmer's guide.

S9. How do I find out if a single word is spelled correctly?

See "How to check spelling of a single word" in the "Using Sentry's Core API" chapter of the Sentry programmer's guide.

S10. How do I find out if the user made corrections to the text?

Call SSCE_GetStatistics. If the value of the wordsChanged parameter is greater than zero, the text was modified.

S11. How do I make Sentry skip over URLs, e-mail addresses, etc.?

Enable the IgnoreDomainNames (SSCE_IGNORE_DOMAIN_NAMES_OPT) option. When this option is set, Sentry skips over text that appears to be a URL or e-mail address.


User interface Questions

U1. How do I change the language of text in the built-in dialog boxes?

See "How to localize Sentry's built-in dialog boxes" in the "Using the Sentry Windows API" chapter of the Sentry programmer's guide.

U2. How do I display the built-in spelling dialog box at a specific screen location?

Call SSCE_SetDialogOrigin. When the spelling dialog is displayed subsequently, it will be displayed at the specified position.

U3. How do I make the built-in dialog boxes display my help file when the Help button is pressed?

See "How to use a different help file" in the "Using the Sentry Windows SDK" chapter of the Sentry programmer's guide.

The help text displayed by the included Windows help file (ssce.hlp) in RTF form is located in ssce\sdk\lib\ssce.rtf. This file can be imported into most help-file generation applications.

Beginning in version 5.16.4, the Sentry DLL will display either Windows Help (.hlp) or HTML help (.chm) help files.

U4. How do I prevent the user from adding words to a user dictionary?

The "Add" button in the built-in spelling dialog box will be enabled only if at least one user dictionary exists. If there are no user dictionaries listed in the UserLexFiles property, the Add button will be disabled.

The user will still be able to add user dictionaries by clicking the "Dictionaries" button.

See How do I remove or disable a button from a built-in dialog box? for instructions on removing or disabling the "Dictionaries" button.

U5. How do I prevent the user from changing options?

The built-in spelling dialog box contains an Options button, which presents the options dialog box. This dialog box allows the user to change certain options.

See How do I remove or disable a button from a built-in dialog box? for instructions on removing or disabling the "Options" button.

U6. How do I remove or disable a button from a built-in dialog box?

 If you want to remove the Options or Dictionaries buttons from the built-in spelling dialog box, you can set the OptionsButtonVisible or DictionariesButtonVisible properties to 0 (see "Sentry Properties" for more information on these properties.

For other buttons, you can define an alternate dialog box template with the button hidden or disabled. See "How to change the appearance of Sentry's dialog boxes" for instructions.

U7. Why doesn't SSCE_CheckCtrlDlg highlight misspelled words in my text box?

See Misspelled word not highlighted in text box being checked for more information.

U8. I'm using the British English dictionary (or the French dictionary, German dictionary, etc.), but the language in the dictionary dialog still displays American English. Why?

The dictionary dialog shows information about user dictionaries. The British English (or French, German, etc.) are main dictionaries. Each dictionary file is independent. Each dictionary file has its own language attribute. Opening a dictionary doesn't change the language attributes of other dictionaries that happen to be open.

Most likely, you are looking at one of the user dictionary files that ships with Sentry Windows SDK, such as userdic.tlx or correct.tlx. These files were created with the American English language attribute. Userdic.tlx is just a sample user dictionary. You can create a new user dictionary using the dictionary dialog and assign it one of the languages that appear in the Language list. Click on the Help button in the dictionary dialog for instructions on creating a new user dictionary file.

If you want to change the language attribute of correct.tlx from American English to British English, open correct.tlx using Notepad, and change the first line from

#LID 24941

to

#LID 25202

U9. How can tell if the user clicked the "Cancel" button in the built-in spelling dialog box?

 SSCE_CheckCtrlDlg and SSCE_CheckBlockDlg return SSCE_CANCEL_ERR when then user clicks the Cancel button.

U10. I have a form containing several text fields. How can I get SSCE_CheckBlockDlg or SSCE_CheckCtrlDlg to check all of the fields?

There is no way to do this directly. Each call to SSCE_CheckBlockDlg or SSCE_CheckCtrlDlg checks a single "document," which can be as small as a single word or as large as an entire book. In a form containing several text fields, each field is a separate document. You could combine the field contents into a single string with separators between fields and use SSCE_CheckBlockDlg to check the string.

U11. I have a form containing several text fields. I check each field individually using SSCE_CheckBlockDlg. If a field contains no spelling errors, the spelling checker dialog appears and disappears quickly, which makes an annoying flashing effect. How can I get rid of this?

When SSCE_CheckBlockDlg's "showContext" parameter is set to true, the dialog will appear even if the checked text contains no spelling errors. This behavior is necessary to prevent other problems. The solution is to check the text in the field first to determine if it contains any spelling errors. If the text contains no spelling errors, don't call SSCE_CheckBlockDlg for that field. To determine if the text contains spelling errors, call SSCE_CheckString to check the text in the field (use SSCE_GetSid to obtain the "sid" parameter for this function). If SSCE_CheckString returns SSCE_END_OF_TEXT_RSLT, the text contains no spelling errors so there is no point in calling SSCE_CheckBlockDlg. If SSCE_CheckString returns anything other than SSCE_END_OF_TEXT_RSLT, the text contains at least one spelling error so calling SSCE_CheckBlockDlg will be worthwhile.

U12. We licensed the German (or French, etc.) dictionary from Wintertree Software and use it in our application, but the text in the spelling checker dialog still appears in English. How do I make the text appear in German (or French, etc.), and do you have or sell a German (or French, etc.) user interface for SSCE?

Dictionaries have nothing to do with the language of text in the Sentry DLL's built-in dialogs. A dictionary is just a database of words. If you want the built-in dialogs to display text in another language, you will have to define dialog templates and alternate text strings for the other language. Wintertree Software does not currently offer templates or strings in other languages. For more information, see See "How to internationalize Sentry" in the "Using the Sentry Windows API" chapter of the Programmer's Guide.

U13. When the spelling checker dialog is visible, the user can switch to my application and make changes, which causes problems. How can I stop this from happening?

 This occurs because you pass 0 or NULL as the "parentWin" parameter to SSCE_CheckBlockDlg or SSCE_CheckCtrlDlg. This disconnects the dialog from your application. To prevent it from happening, pass a valid window handle, such as the handle of your application's main window (or a form, etc.) in the "parentWin" parameter.

U14. How can I make the spelling checker dialog behave modelessly?

The built-in spelling checker dialog is modal. There is no way to make it behave modelessly. The dialog appears while checking text during a call to SSCE_CheckBlockDlg or SSCE_CheckCtrlDlg, and disappears when checking is finished or the user cancels, at which point the function call returns to your application. To change this behavior, you could create your own modeless dialog, or upgrade to the SSCE Source SDK and make whatever changes are necessary to make the dialog behave modelessly.

U15. Why doesn't SSCE_CheckCtrlBackground mark misspelled words with a red zig-zag underline like Word/Office does?

When it detects a misspelled word, SSCE_CheckCtrlBackground (and other background-related functions, such as SSCE_CheckCtrlBackgroundNotify) instructs the monitored control to change the text attributes of the misspelled word to bring it to the user's attention. The attributes are changed according to the "options" parameter you pass to SSCE_CheckCtrlBackground. Standard rich-edit controls (rich-text boxes) do not support a red zig-zag underline attribute. TX Text Control, however, does support this attribute, so when SSCE_BACKGROUND_MARK_UNDERLINE is set, misspelled words are marked with a red zig-zag underline.


Home Site index Contact us Catalog Shopping Cart Products Support Search


Copyright © 2015 Wintertree Software Inc.