Unicode Sample

unicode


Requirements

This sample demonstates Unicode compatibilty. It therefore assumes a fully Unicode compatible operating system and recommends the system has more than one input locale installed. The system used to generate the above screenshot shows the sample running on Windows 2000 with the Korean IME installed. Since Windows 95/98/Me does not provide full built-in support for Unicode please refer to "Compiling WEL for Unicode on Windows 95/98/Me" before attempting to run this example.

Compiling

To compile the example:

Running

After launching the program, a window will be displayed as illustrated above. Selecting the input locale combo box will allow you to switch to a new input locale. To add new input locales to your system do the following:

Selecting an input locale allows entry of the chosen input locale characters into the rich-edit control to right. Clicking the "Apply to Controls" button will update the controls in the pane below to display the same text as the rich-edit control. If the selected input locale is associated with an Input Method Editor (IME), the details for this will be displayed in the "Input Method Editor" group box and IME specific options will be made available from the "IME Options" menu.

Under the Hood

There is one MAIN_WINDOW class used for all the controls. The feature 'init_locale_list' is used to determine the systems available input locales and populate the corresponding "Input Locales" combo box. The features 'change_font' and 'change_control' are used to change the applications font (in case the curently selected font does not correctly display Unicode characters), and to set the 'text' property of all controls to the same as that in the rich-edit box.

This sample contains the following classes: