Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.11.05;
Скачать: CL | DM;

Вниз

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 вся ветка

Текущий архив: 2006.11.05;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.063 c
2-1161255785
pkm
2006-10-19 15:03
2006.11.05
Удалить текущую строку в типизированном файле.


2-1160907447
Kolan
2006-10-15 14:17
2006.11.05
Правильно сложить 2 дин. массива


3-1157698560
angelsaint
2006-09-08 10:56
2006.11.05
как сделать ввод дат "до н.э."


3-1157607840
tytus
2006-09-07 09:44
2006.11.05
Ошибка ORA-12514


3-1157904227
так себе
2006-09-10 20:03
2006.11.05
Подредактируйте запрос