views:

16

answers:

0

I have a Borland C++ Builder VCL app (so I am not working with Unicode yet), I want to provide a simple translation of controls' caption text to Russian at runtime.

I can easily use EnumChildWindows to get the English caption, then lookup the translation and replace the caption text using SetWindowText. This does work well for my western European translations where I don't have to worry about the font. But I am not sure how the Russian version of Windows and then VCL handles 8 bit cyrillic character sets.

Currently all the VCL controls have the font settings:

Charset=DEFAULT_CHARSET
name=MS Sans Serif

Am I correct in assuming that when my program is run under a Russian version of Windows the character set will be cyrillic with the DEFAULT_CHARSET setting so I won't need to change the font settings in all my controls?

If I do have to change the font (at run time), should the Windows API function SendMessage(hwnd,WM_SETFONT,(WPARAM)hFont,TRUE) work with VCL controls ? I have tried using the CreateFont() and SendMessage(..WM_SETFONT..) with RUSSIAN_CHARSET and a cyrillic font face. This doesn't appear to have any effect, it keeps the font that was set for the control in the form at design time (even ANSI_CHARSET and a standard Windows-installed font face doesn't affect the controls' font) so I looking for confirmation that I won't have to change the font of the controls, or else tell me some VCL method for setting all the controls' font settings at runtime .