Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "KOL";
Текущий архив: 2006.11.05;
Скачать: [xml.tar.bz2];

Вниз

KOL Unicode   Найти похожие ветки 

 
Boguslaw   (2006-01-21 20:23) [0]

Hello,

I found that TPopup menu itemsare not unicode enabled even if
UNICODE_CTRLS  is defined. What else does not support Unicode ? Or maybe that define is dead ?


 
Boguslaw   (2006-01-21 20:34) [1]

Ahhhh I found that Caption, Text properties are also Ansi strings.So what is the reason to define  UNICODE_CTRLS when it is not usable ? (most used unicode enabled controls properties are Caption and Text) Is it possible to add define around this and enable unicode enabled like :
{$IFNDEF UNICODE_CTRLS}
type
   TKOLString = String;
{$ELSE}
   TKOLString = WideString;
{$ENDIF}

property Caption: TKOLString read GetCaption write SetCaption;

Vladimir : is that be a big work ? is my proposition reliable ?
SetCaption would not be hard to modify but it"s called from many assembler parts and Length of WideString is doubled

Regards
Boguslaw Brandys


 
Boguslaw   (2006-01-21 20:46) [2]

Sorry,this is not so easy.
SetWindowTextW function is available only on WinNT/XP :-(
On Delphi there are TNTWare controls which opaque ordinary controls but as KOL has flat control hierarchy that would"nt help There must be some check of run-time platform and global variable to fast check and choose proper Ansi/Unicode version of functions.
So if UNICODE_CTRLS is defined that should be global KOL variable or function to differentiate also runtime platform inside SetCaption/GetCaption


 
Boguslaw   (2006-01-21 22:00) [3]

Well,I"m talking about Unicode Caption and Text bacause I ported dxgnugetext package (partially) and would be great to have multibyte language chars (Chinese) properly displayed on menu


 
Boguslaw   (2006-01-22 17:06) [4]

ok.I changed TMenu to use Unicode versions of functions and menu it"s now working with multibyte charset (not from start because FillMenuItems still fill with Ansi, but later all Caption could be set using kolgnugetext and it works like a charm displaying chinese and arabic menu items :-) ), however setting Unicode Caption and Text properties require rewrite of CreateWindow procedure using unicode versions of CreateWindowExW etc.

Anybody willing to help ?


 
Boguslaw   (2006-01-22 22:21) [5]

OK.I managed to make Caption and Text property of TControl fully Unicode ,but only for PAS_VERSION.Vladimir , are you interested ? There is still CreateWindow and other ASM functions version to check and fix.


 
Boguslaw   (2006-01-22 22:25) [6]

I tested only Unicode captions of TPopupMenu and TLabel (other NewXXX functions should be checked and fixed also)


 
Vladimir Kladov   (2006-01-22 23:06) [7]

I can add your code (certainly with {$IFDEF} brackets). Bit now I am too busy to test it a lot and to take part in extnding to another controls. If number of changes is big enough, you can make an update file with updmaker with base version e.g. 2.30 or 2.31 or 2.32 of KOL.



Страницы: 1 вся ветка

Форум: "KOL";
Текущий архив: 2006.11.05;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.05 c
15-1160644299
Desdechado
2006-10-12 13:11
2006.11.05
Пара вопросов по VS 2005


4-1148999649
Turbid
2006-05-30 18:34
2006.11.05
Программа в оперативной памяти


6-1150401090
XeON
2006-06-15 23:51
2006.11.05
Посчет DialUp траффика


15-1160657889
oldman
2006-10-12 16:58
2006.11.05
Ну вот и все... Как дальше жить?


15-1161108118
learner
2006-10-17 22:01
2006.11.05
Это у меня глюк или у DMClient ?





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский