All the notification messages and control messages for the single line entry field control can be used even in the DBCS PM. For example, you can obtain the string in an entry field, which may contain DBCS, with the WinQueryWindowText call or WM_QUERYWINDOWPARAMS message.
However, you need to give the considerations for mixed string manipulation explained in String Manipulation. For example, do not specify the offset of the second byte of a DBCS character in EM_SETSEL; avoid bisection of a DBCS character in truncating of a mixed string.
Note: The error handling of the single line entry field control is different from that of the multi-line entry field control. See Multi-line Entry Field Control for more information.
The entry field control is enhanced for DBCS. The following styles are
added to filter user input and ES_MIXED is added to cope with the
code scheme difference between ASCII and EBCDIC mixed strings. These styles
are also explained in section Entry Field Control Styles of OS/2
Version 2.0 Programming Guide: Volume 2(SC18-2515-00).
Style
ES_SBCS
Accepted String Type
This is the default value.
The number of bytes allowed to be inputted will be reduced by two bytes from the text length limit (set by EM_SETTEXTLIMIT or 32 bytes as its defaults) each time a transition from SBCS to DBCS occurs. The number of reduced bytes corresponds to the number of SO/SI control characters, which would be added by a subsequent ASCII to EBCDIC conversion. The byte length of the conversion result will not exceed the original text length limit.
Since SBCS OS/2 neglects these styles, your program will work for SBCS environment as well.
The following describes how each message is processed by each style. (As for the processes common to all the styles, see the manuals of SBCS OS/2.)