INFO: Dialog Box Creation Fails If Text Starts w/ Character 255 (66926)
The information in this article applies to:
- Microsoft Windows Software Development Kit (SDK) 3.1
This article was previously published under Q66926
3.00 3.10
WINDOWS
kbprg
SUMMARY
Text strings in a dialog box resource cannot start with the character
represented by the value 255 (0xFF). In the ANSI character set, this
character is the letter "y" with a diaeresis mark, which is used primarily
in Nordic languages. If Windows encounters this situation, a call to
DialogBox() or CreateDialog() will fail.
The following are two possible solutions:
- Create the control with some "dummy" text. Then, use the SetDlgItemText() function during the processing of the WM_INITDIALOG message to manually set the text of the control to its proper value. This is the preferred method.
-or-
- Instead of starting the text with the 255 character, use a space,
followed by a backspace character and the 255 character. For example,
the text in the dialog box script can be " \0008x", where "x" is the
255 character. The embedded backspace erases the space, leaving only
the 255 character.
Modification Type: | Minor | Last Reviewed: | 2/11/2005 |
---|
Keywords: | kb16bitonly kbDlg kbinfo KB66926 |
---|
|