utf8vcl-cvs Mailing List for UTF-8 VCL (Page 2)
Status: Alpha
Brought to you by:
bluelive
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
(30) |
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Andreas H. <ah...@us...> - 2007-03-19 00:15:36
|
Update of /cvsroot/utf8vcl/utf8vcl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31406 Modified Files: UTF8VCL.pas UTF8VCLMessages.pas UTF8VCLUtils.pas Log Message: Some cleanup Index: UTF8VCLUtils.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCLUtils.pas,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** UTF8VCLUtils.pas 12 Mar 2007 19:31:17 -0000 1.10 --- UTF8VCLUtils.pas 17 Mar 2007 21:48:28 -0000 1.11 *************** *** 105,111 **** Result := PAbsoluteIndirectJmp(Proc).Addr^ else - if (PAbsoluteIndirectJmp(Proc).OpCode = $) then // JMP mem32 - Result := PAbsoluteIndirectJmp(Proc).Addr^ - else Result := Proc; end --- 105,108 ---- Index: UTF8VCLMessages.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCLMessages.pas,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** UTF8VCLMessages.pas 12 Mar 2007 19:31:17 -0000 1.18 --- UTF8VCLMessages.pas 17 Mar 2007 21:48:28 -0000 1.19 *************** *** 345,349 **** end; end; ! Result := TempResult; // use CPU register when possible end; --- 345,349 ---- end; end; ! Result := TempResult; end; Index: UTF8VCL.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCL.pas,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** UTF8VCL.pas 16 Mar 2007 23:39:11 -0000 1.15 --- UTF8VCL.pas 17 Mar 2007 21:48:28 -0000 1.16 *************** *** 19,28 **** UTF8VCLUtils, UTF8VCLMessages, UTF8VCLControls; - { - function _CreateWindowExA(dwExStyle: DWORD; lpClassName: PAnsiChar; - lpWindowName: PAnsiChar; dwStyle: DWORD; X, Y, nWidth, nHeight: Integer; - hWndParent: HWND; hMenu: HMENU; hInstance: HINST; lpParam: Pointer): HWND; - stdcall; external user32 name 'CreateWindowExA'; - } function _CreateWindowExW(dwExStyle: DWORD; lpClassName: PWideChar; lpWindowName: PWideChar; dwStyle: DWORD; X, Y, nWidth, nHeight: Integer; --- 19,22 ---- *************** *** 123,133 **** end; - {function CreateWindowAIntercept(lpClassName: PAnsiChar; lpWindowName: PAnsiChar; dwStyle: DWORD; - X, Y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU; hInstance: HINST; lpParam: Pointer): HWND; - begin - Result := CreateWindowExAIntercept(0, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, - hWndParent, hMenu, hInstance, lpParam); - end;} - function UnregisterClassAIntercept(lpClassName: PAnsiChar; hInstance: HINST): BOOL; stdcall; var --- 117,120 ---- |
From: Bart v. d. W. <blu...@us...> - 2007-03-18 22:48:55
|
Update of /cvsroot/utf8vcl/utf8vcl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6309 Modified Files: MissingMethods-incomplete.txt MissingWindowMessages-incomplete.txt TestForm.dfm TestForm.pas UTF8VCL.pas UTF8VCLMessages.pas UTF8VCLUtils.pas Log Message: Fix problem with bogus character after some components. Further extend functionality. Add a few more test components. Basicly we support pretty much all of the first two tabs of the components. Index: UTF8VCLUtils.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCLUtils.pas,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** UTF8VCLUtils.pas 18 Mar 2007 11:26:41 -0000 1.13 --- UTF8VCLUtils.pas 18 Mar 2007 21:47:34 -0000 1.14 *************** *** 237,240 **** --- 237,242 ---- function ConvertFromUTF8(lpUTF8: PUtf8Char; LenIn: Integer; var LenOut: Integer): PWideChar; + var + Len: Integer; begin Result := nil; *************** *** 245,252 **** if LenOut = 0 then RaiseLastOSError; ! GetMem(Result, SizeOf(WideChar) * (LenOut + 1)); ! Result[LenOut] := #0; ! if MultiByteToWideChar(CP_UTF8, 0, lpUTF8, LenIn, Result, LenOut + 1) = 0 then RaiseLastOSError; end; --- 247,259 ---- if LenOut = 0 then RaiseLastOSError; ! Len := LenOut; ! if lpUTF8[LenIn-1] <> #0 then ! Inc(Len); ! GetMem(Result, SizeOf(WideChar) * (Len)); ! Result[Len-1] := #0; ! if MultiByteToWideChar(CP_UTF8, 0, lpUTF8, LenIn, Result, Len) = 0 then RaiseLastOSError; + if Result[LenOut-1] = #0 then + Dec(LenOut); end; *************** *** 256,259 **** --- 263,268 ---- if not Assigned(lpUTF8) or (LenIn = 0) then Exit; + if lpUTF8[LenIn-1] = #0 then + Dec(LenIn); Result := MultiByteToWideChar(CP_UTF8, 0, lpUTF8, LenIn, nil, 0); if Result = 0 then *************** *** 268,276 **** if not Assigned(lpUTF8) then Exit; ! L := lstrlenA(lpUTF8); Result := ConvertFromUTF8(lpUTF8, L, R); end; function ConvertToUTF8(lpWide: PWideChar; LenIn: Integer; var LenOut: Integer): PUtf8Char; begin Result := nil; --- 277,287 ---- if not Assigned(lpUTF8) then Exit; ! L := lstrlenA(lpUTF8) + 1; Result := ConvertFromUTF8(lpUTF8, L, R); end; function ConvertToUTF8(lpWide: PWideChar; LenIn: Integer; var LenOut: Integer): PUtf8Char; + var + Len: Integer; begin Result := nil; *************** *** 283,290 **** if LenOut = 0 then RaiseLastOSError; ! GetMem(Result, SizeOf(Utf8Byte) * (LenOut + 1)); ! Result[LenOut] := #0; ! if WideCharToMultiByte(CP_UTF8, 0, lpWide, LenIn, Result, LenOut, nil, nil) = 0 then RaiseLastOSError; end; --- 294,306 ---- if LenOut = 0 then RaiseLastOSError; ! Len := LenOut; ! if lpWide[LenIn-1] <> #0 then ! Inc(Len); ! GetMem(Result, SizeOf(Utf8Byte) * (Len)); ! Result[Len-1] := #0; ! if WideCharToMultiByte(CP_UTF8, 0, lpWide, LenIn, Result, Len, nil, nil) = 0 then RaiseLastOSError; + if Result[LenOut-1] = #0 then + Dec(LenOut); end; *************** *** 294,297 **** --- 310,316 ---- if not Assigned(lpWide) or (LenIn = 0) then Exit; + if lpWide[LenIn-1] = #0 then + Dec(LenIn); + Result := WideCharToMultiByte(CP_UTF8, 0, lpWide, LenIn, nil, 0, nil, nil); if Result = 0 then *************** *** 306,310 **** if not Assigned(lpWide) then Exit; ! L := lstrlenW(lpWide); Result := ConvertToUTF8(lpWide, L, R); end; --- 325,329 ---- if not Assigned(lpWide) then Exit; ! L := lstrlenW(lpWide) + 1; Result := ConvertToUTF8(lpWide, L, R); end; Index: MissingMethods-incomplete.txt =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/MissingMethods-incomplete.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MissingMethods-incomplete.txt 16 Mar 2007 23:39:11 -0000 1.6 --- MissingMethods-incomplete.txt 18 Mar 2007 21:47:34 -0000 1.7 *************** *** 1,5 **** - Special methods that need patching: - Controls.TWinControl.DoKeyPress - --- 1,2 ---- *************** *** 10,14 **** DispatchMessageA - GetACP CharNextA CharToOemA --- 7,10 ---- Index: UTF8VCL.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCL.pas,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** UTF8VCL.pas 18 Mar 2007 16:28:10 -0000 1.20 --- UTF8VCL.pas 18 Mar 2007 21:47:34 -0000 1.21 *************** *** 308,312 **** --- 308,314 ---- begin if (Cardinal(lpClassName) and $FFFF0000) <> 0 then + begin C := ConvertFromUTF8(lpClassName) + end else // This isn't a string but a special id *************** *** 394,401 **** X: PUtf8Char; begin - X := nil; L := nMaxCount; if nMaxCount > 0 then begin GetMem(C, SizeOf(WideChar) * L); try --- 396,403 ---- X: PUtf8Char; begin L := nMaxCount; if nMaxCount > 0 then begin + X := nil; GetMem(C, SizeOf(WideChar) * L); try *************** *** 626,629 **** --- 628,637 ---- end; + function GetACPIntercept: UINT; stdcall; + begin + Result := CP_UTF8; + end; + + var LibUser32: HMODULE = 0; *************** *** 680,683 **** --- 688,693 ---- HookKernel32Func('MultiByteToWideChar', @MultiByteToWideCharIntercept); // do not localize HookKernel32Func('WideCharToMultiByte', @WideCharToMultiByteIntercept); // do not localize + HookKernel32Func('GetACP', @GetACPIntercept); // do not localize + HookUser32Func('SendMessageA', @SendMessageAIntercept); // do not localize Index: UTF8VCLMessages.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCLMessages.pas,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** UTF8VCLMessages.pas 18 Mar 2007 07:56:10 -0000 1.20 --- UTF8VCLMessages.pas 18 Mar 2007 21:47:34 -0000 1.21 *************** *** 89,94 **** end; WM_SETTEXT, WM_WININICHANGE, WM_DEVMODECHANGE, CB_DIR, LB_DIR, LB_ADDFILE, ! EM_REPLACESEL, LB_ADDSTRING, LB_INSERTSTRING, CB_ADDSTRING, CB_INSERTSTRING, LB_FINDSTRING, ! CB_FINDSTRING: OutLParam := LPARAM(ConvertToUTF8(PWideChar(InLParam))); // character fiddling, TODO --- 89,95 ---- end; WM_SETTEXT, WM_WININICHANGE, WM_DEVMODECHANGE, CB_DIR, LB_DIR, LB_ADDFILE, ! EM_REPLACESEL, LB_ADDSTRING, LB_INSERTSTRING, CB_ADDSTRING, CB_INSERTSTRING, ! LB_FINDSTRING, LB_FINDSTRINGEXACT, LB_SELECTSTRING, CB_FINDSTRING, ! CB_FINDSTRINGEXACT: OutLParam := LPARAM(ConvertToUTF8(PWideChar(InLParam))); // character fiddling, TODO *************** *** 143,148 **** end; WM_SETTEXT, WM_WININICHANGE, WM_DEVMODECHANGE, CB_DIR, LB_DIR, LB_ADDFILE, ! EM_REPLACESEL, LB_ADDSTRING, LB_INSERTSTRING, CB_ADDSTRING, CB_INSERTSTRING, LB_FINDSTRING, ! CB_FINDSTRING: FreeMem(PChar(TempLParam)); --- 144,149 ---- end; WM_SETTEXT, WM_WININICHANGE, WM_DEVMODECHANGE, CB_DIR, LB_DIR, LB_ADDFILE, ! EM_REPLACESEL, LB_ADDSTRING, LB_INSERTSTRING, CB_ADDSTRING, CB_INSERTSTRING, LB_FINDSTRING, LB_FINDSTRINGEXACT, LB_SELECTSTRING, ! CB_FINDSTRING, CB_FINDSTRINGEXACT: FreeMem(PChar(TempLParam)); *************** *** 250,255 **** end; WM_SETTEXT, WM_WININICHANGE, WM_DEVMODECHANGE, CB_DIR, LB_DIR, LB_ADDFILE, ! EM_REPLACESEL, LB_ADDSTRING, LB_INSERTSTRING, CB_ADDSTRING, CB_INSERTSTRING, LB_FINDSTRING, ! CB_FINDSTRING: OutLParam := LPARAM(ConvertFromUTF8(PChar(InLParam))); //character fiddling, TODO --- 251,256 ---- end; WM_SETTEXT, WM_WININICHANGE, WM_DEVMODECHANGE, CB_DIR, LB_DIR, LB_ADDFILE, ! EM_REPLACESEL, LB_ADDSTRING, LB_INSERTSTRING, CB_ADDSTRING, CB_INSERTSTRING, LB_FINDSTRING, LB_FINDSTRINGEXACT, LB_SELECTSTRING, ! CB_FINDSTRING, CB_FINDSTRINGEXACT: OutLParam := LPARAM(ConvertFromUTF8(PChar(InLParam))); //character fiddling, TODO *************** *** 303,308 **** end; WM_SETTEXT, WM_WININICHANGE, WM_DEVMODECHANGE, CB_DIR, LB_DIR, LB_ADDFILE, ! EM_REPLACESEL, LB_ADDSTRING, LB_INSERTSTRING, CB_ADDSTRING, CB_INSERTSTRING, LB_FINDSTRING, ! CB_FINDSTRING: FreeMem(PWideChar(TempLParam)); WM_GETTEXTLENGTH: --- 304,309 ---- end; WM_SETTEXT, WM_WININICHANGE, WM_DEVMODECHANGE, CB_DIR, LB_DIR, LB_ADDFILE, ! EM_REPLACESEL, LB_ADDSTRING, LB_INSERTSTRING, CB_ADDSTRING, CB_INSERTSTRING, LB_FINDSTRING, LB_FINDSTRINGEXACT, LB_SELECTSTRING, ! CB_FINDSTRING, CB_FINDSTRINGEXACT: FreeMem(PWideChar(TempLParam)); WM_GETTEXTLENGTH: Index: TestForm.dfm =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.dfm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** TestForm.dfm 18 Mar 2007 15:12:56 -0000 1.15 --- TestForm.dfm 18 Mar 2007 21:47:34 -0000 1.16 *************** *** 1,5 **** object Form1: TForm1 ! Left = 234 ! Top = 127 BorderIcons = [biSystemMenu, biMinimize] BorderStyle = bsSingle --- 1,5 ---- object Form1: TForm1 ! Left = 438 ! Top = 135 BorderIcons = [biSystemMenu, biMinimize] BorderStyle = bsSingle *************** *** 15,19 **** --- 15,21 ---- Menu = MainMenu1 OldCreateOrder = False + PopupMenu = PopupMenu1 Position = poScreenCenter + ShowHint = True PixelsPerInch = 96 TextHeight = 14 *************** *** 26,32 **** end object SpeedButton1: TSpeedButton ! Left = 96 Top = 184 ! Width = 81 Height = 22 Caption = 'SpeedButton1' --- 28,34 ---- end object SpeedButton1: TSpeedButton ! Left = 72 Top = 184 ! Width = 57 Height = 22 Caption = 'SpeedButton1' *************** *** 35,39 **** Left = 7 Top = 28 ! Width = 196 Height = 22 TabOrder = 0 --- 37,41 ---- Left = 7 Top = 28 ! Width = 122 Height = 22 TabOrder = 0 *************** *** 43,47 **** Left = 7 Top = 56 ! Width = 196 Height = 42 Ctl3D = True --- 45,49 ---- Left = 7 Top = 56 ! Width = 122 Height = 42 Ctl3D = True *************** *** 61,66 **** object CheckBox1: TCheckBox Left = 77 ! Top = 105 ! Width = 126 Height = 14 Caption = 'CheckBox1' --- 63,68 ---- object CheckBox1: TCheckBox Left = 77 ! Top = 113 ! Width = 52 Height = 14 Caption = 'CheckBox1' *************** *** 68,74 **** end object RadioButton1: TRadioButton ! Left = 209 ! Top = 161 ! Width = 162 Height = 14 Caption = 'RadioButton1' --- 70,76 ---- end object RadioButton1: TRadioButton ! Left = 137 ! Top = 169 ! Width = 120 Height = 14 Caption = 'RadioButton1' *************** *** 78,82 **** Left = 7 Top = 133 ! Width = 196 Height = 42 ItemHeight = 14 --- 80,84 ---- Left = 7 Top = 133 ! Width = 122 Height = 42 ItemHeight = 14 *************** *** 86,92 **** end object ComboBox1: TComboBox ! Left = 209 ! Top = 133 ! Width = 162 Height = 22 ItemHeight = 14 --- 88,94 ---- end object ComboBox1: TComboBox ! Left = 137 ! Top = 141 ! Width = 120 Height = 22 ItemHeight = 14 *************** *** 97,103 **** end object GroupBox1: TGroupBox ! Left = 209 ! Top = 84 ! Width = 162 Height = 42 Caption = 'GroupBox1' --- 99,105 ---- end object GroupBox1: TGroupBox ! Left = 137 ! Top = 92 ! Width = 120 Height = 42 Caption = 'GroupBox1' *************** *** 123,139 **** end object RichEdit1: TRichEdit ! Left = 209 ! Top = 0 Width = 162 Height = 77 Lines.Strings = ( ! 'RichEdit1') TabOrder = 10 end object StringGrid1: TStringGrid ! Left = 376 ! Top = 0 ! Width = 217 ! Height = 120 ColCount = 3 RowCount = 4 --- 125,143 ---- end object RichEdit1: TRichEdit ! Left = 441 ! Top = 128 Width = 162 Height = 77 Lines.Strings = ( ! 'RichEdit1' ! 'currently does not handle ' ! 'unicode') TabOrder = 10 end object StringGrid1: TStringGrid ! Left = 136 ! Top = 8 ! Width = 121 ! Height = 81 ColCount = 3 RowCount = 4 *************** *** 146,151 **** end object ListView1: TListView ! Left = 373 ! Top = 127 Width = 225 Height = 105 --- 150,155 ---- end object ListView1: TListView ! Left = 381 ! Top = 15 Width = 225 Height = 105 *************** *** 197,201 **** Left = 8 Top = 184 ! Width = 75 Height = 25 Caption = 'BitBtn1' --- 201,205 ---- Left = 8 Top = 184 ! Width = 57 Height = 25 Caption = 'BitBtn1' *************** *** 203,207 **** end object StaticText1: TStaticText ! Left = 200 Top = 184 Width = 58 --- 207,211 ---- end object StaticText1: TStaticText ! Left = 136 Top = 184 Width = 58 *************** *** 213,217 **** Left = 8 Top = 216 ! Width = 273 Height = 49 DisplayOptions = [doColumnTitles, doAutoColResize] --- 217,221 ---- Left = 8 Top = 216 ! Width = 121 Height = 49 DisplayOptions = [doColumnTitles, doAutoColResize] *************** *** 220,229 **** TabOrder = 18 ColWidths = ( ! 133 ! 134) end object Panel1: TPanel ! Left = 288 ! Top = 248 Width = 121 Height = 41 --- 224,233 ---- TabOrder = 18 ColWidths = ( ! 57 ! 58) end object Panel1: TPanel ! Left = 136 ! Top = 328 Width = 121 Height = 41 *************** *** 232,238 **** end object RadioGroup1: TRadioGroup ! Left = 280 ! Top = 176 ! Width = 89 Height = 33 Caption = 'RadioGroup1' --- 236,242 ---- end object RadioGroup1: TRadioGroup ! Left = 136 ! Top = 200 ! Width = 121 Height = 33 Caption = 'RadioGroup1' *************** *** 247,253 **** Text = 'MaskEdit1' end object MainMenu1: TMainMenu ! Left = 104 ! Top = 24 object Menu1: TMenuItem Caption = 'Menu' --- 251,278 ---- Text = 'MaskEdit1' end + object CheckListBox1: TCheckListBox + Left = 136 + Top = 240 + Width = 121 + Height = 41 + ItemHeight = 14 + Items.Strings = ( + 'CheckListBox1') + TabOrder = 22 + end + object LabeledEdit1: TLabeledEdit + Left = 136 + Top = 304 + Width = 121 + Height = 22 + EditLabel.Width = 61 + EditLabel.Height = 14 + EditLabel.Caption = 'LabeledEdit1' + TabOrder = 23 + Text = 'LabeledEdit1' + end object MainMenu1: TMainMenu ! Left = 8 ! Top = 304 object Menu1: TMenuItem Caption = 'Menu' *************** *** 267,272 **** end object ActionList1: TActionList ! Left = 152 Top = 304 end end --- 292,304 ---- end object ActionList1: TActionList ! Left = 72 Top = 304 end + object PopupMenu1: TPopupMenu + Left = 40 + Top = 304 + object PopupMenu11: TMenuItem + Caption = 'PopupMenu1' + end + end end Index: TestForm.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.pas,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** TestForm.pas 18 Mar 2007 16:28:09 -0000 1.21 --- TestForm.pas 18 Mar 2007 21:47:34 -0000 1.22 *************** *** 12,16 **** Windows, SysUtils, Classes, Controls, Forms, Dialogs, ComCtrls, StdCtrls, Menus, Grids, ValEdit, Buttons, ExtCtrls, ! Mask, ActnList; type --- 12,16 ---- Windows, SysUtils, Classes, Controls, Forms, Dialogs, ComCtrls, StdCtrls, Menus, Grids, ValEdit, Buttons, ExtCtrls, ! Mask, ActnList, CheckLst, DBGrids, Gauges, ShellCtrls; type *************** *** 45,48 **** --- 45,52 ---- ActionList1: TActionList; MaskEdit1: TMaskEdit; + PopupMenu1: TPopupMenu; + PopupMenu11: TMenuItem; + CheckListBox1: TCheckListBox; + LabeledEdit1: TLabeledEdit; procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); *************** *** 70,75 **** X, Y: Integer; ! procedure CheckTranslation(ComponentName, Content: string; Test: string = TestText); begin if Content <> Test then ShowMessageFmt('Component "%s" does not work yet "%s" vs. "%s"', [ComponentName, Test, Content]); --- 74,81 ---- X, Y: Integer; ! procedure CheckTranslation(ComponentName, Content: string; Test: string = ''); begin + if Test = '' then + Test := TestText; if Content <> Test then ShowMessageFmt('Component "%s" does not work yet "%s" vs. "%s"', [ComponentName, Test, Content]); *************** *** 77,84 **** --- 83,98 ---- begin + Hint := TestText; + + CheckListBox1.Items[0] := TestText; + CheckTranslation(CheckListBox1.Name, CheckListBox1.Items[0]); + LabeledEdit1.Text := TestText; + CheckTranslation(LabeledEdit1.Name, LabeledEdit1.Text); Menu1.Caption := TestText1 + '&' + TestText2; CheckTranslation(Menu1.Name, Menu1.Caption, TestText1 + '&' + TestText2); menuItem1.Caption := TestText; CheckTranslation(menuItem1.Name, menuItem1.Caption); + PopupMenu1.Items[0].Caption := TestText; + CheckTranslation(PopupMenu1.Name, PopupMenu1.Items[0].Caption); Label1.Caption := TestText; CheckTranslation(Label1.Name, Label1.Caption); *************** *** 284,288 **** procedure TForm1.Button4Click(Sender: TObject); begin ! FatalAppExit(0, TestText); end; --- 298,302 ---- procedure TForm1.Button4Click(Sender: TObject); begin ! FatalAppExit(0, PAnsiChar(TestText)); end; Index: MissingWindowMessages-incomplete.txt =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/MissingWindowMessages-incomplete.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MissingWindowMessages-incomplete.txt 14 Mar 2007 10:18:09 -0000 1.3 --- MissingWindowMessages-incomplete.txt 18 Mar 2007 21:47:34 -0000 1.4 *************** *** 1,14 **** - LB_SELECTSTRING EN_MAXTEXT EM_GETLIMITTEXT EM_POSFROMCHAR EM_CHARFROMPOS ! LB_ADDSTRING ! LB_INSERTSTRING ! LB_SELECTSTRING ! LB_FINDSTRING ! LB_FINDSTRINGEXACT ! CB_ADDSTRING ! CB_INSERTSTRING ! CB_FINDSTRING ! CB_FINDSTRINGEXACT \ No newline at end of file --- 1,6 ---- EN_MAXTEXT EM_GETLIMITTEXT EM_POSFROMCHAR EM_CHARFROMPOS ! ! |
From: Robert M. <mar...@us...> - 2007-03-18 22:48:36
|
Update of /cvsroot/utf8vcl/utf8vcl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22737 Modified Files: TestForm.pas UTF8VCL.pas Log Message: better test text, cleanup, CP_THREAD_ACP declared locally (missing in D6) Index: TestForm.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.pas,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** TestForm.pas 18 Mar 2007 15:12:56 -0000 1.20 --- TestForm.pas 18 Mar 2007 16:28:09 -0000 1.21 *************** *** 62,67 **** const ! TestText = ! #$49#$C3#$B1#$74#$C3#$AB#$72#$6E#$C3#$A2#$74#$69#$C3#$B4#$6E#$C3#$A0#$6C#$69#$7A#$C3#$A6#$74#$69#$C3#$B8#$6E; procedure TForm1.Button2Click(Sender: TObject); --- 62,68 ---- const ! TestText1 = 'I'#$C3#$B1#$74#$C3#$AB#$72#$6E#$C3#$A2; ! TestText2 = 't'#$D1#$96#$C3#$B4#$6E#$C3#$A0#$6C#$D1#$96#$7A#$C3#$A6#$74#$D1#$96#$C3#$B8#$6E; ! TestText = TestText1 + TestText2; procedure TForm1.Button2Click(Sender: TObject); *************** *** 76,81 **** begin ! Menu1.Caption := TestText; ! CheckTranslation(Menu1.Name, Menu1.Caption, '&' + TestText); menuItem1.Caption := TestText; CheckTranslation(menuItem1.Name, menuItem1.Caption); --- 77,82 ---- begin ! Menu1.Caption := TestText1 + '&' + TestText2; ! CheckTranslation(Menu1.Name, Menu1.Caption, TestText1 + '&' + TestText2); menuItem1.Caption := TestText; CheckTranslation(menuItem1.Name, menuItem1.Caption); *************** *** 153,160 **** X, Y: Integer; Content: string; ! S: String; Wide: WideString; begin ! OpenDialog1.Filter := TestText +'|*.*'; OpenDialog1.FileName := TestText; // OpenDialog1.Execute; --- 154,161 ---- X, Y: Integer; Content: string; ! S: string; Wide: WideString; begin ! OpenDialog1.Filter := TestText + '|*.*'; OpenDialog1.FileName := TestText; // OpenDialog1.Execute; *************** *** 272,277 **** Assert(Self.Text = Content); ! for Y := 0 to StringGrid1.RowCount -1 do ! for X := 0 to StringGrid1.ColCount -1 do begin Content := StringGrid1.Rows[Y][X]; --- 273,278 ---- Assert(Self.Text = Content); ! for Y := 0 to StringGrid1.RowCount - 1 do ! for X := 0 to StringGrid1.ColCount - 1 do begin Content := StringGrid1.Rows[Y][X]; Index: UTF8VCL.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCL.pas,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** UTF8VCL.pas 18 Mar 2007 15:12:57 -0000 1.19 --- UTF8VCL.pas 18 Mar 2007 16:28:10 -0000 1.20 *************** *** 19,26 **** UTF8VCLUtils, UTF8VCLMessages; ! function _CreateWindowExW(dwExStyle: DWORD; lpClassName: PWideChar; ! lpWindowName: PWideChar; dwStyle: DWORD; X, Y, nWidth, nHeight: Integer; ! hWndParent: HWND; hMenu: HMENU; hInstance: HINST; lpParam: Pointer): HWND; ! stdcall; external user32 name 'CreateWindowExW'; type --- 19,25 ---- UTF8VCLUtils, UTF8VCLMessages; ! const ! // not available in all Delphi versions (taken from JwaWinNLS.pas) ! CP_THREAD_ACP = 3; // current thread's ANSI code page type *************** *** 32,35 **** --- 31,39 ---- cchMultiByte: Integer; lpDefaultChar: LPCSTR; lpUsedDefaultChar: PBOOL): Integer; stdcall; + function _CreateWindowExW(dwExStyle: DWORD; lpClassName: PWideChar; + lpWindowName: PWideChar; dwStyle: DWORD; X, Y, nWidth, nHeight: Integer; + hWndParent: HWND; hMenu: HMENU; hInstance: HINST; lpParam: Pointer): HWND; + stdcall; external user32 name 'CreateWindowExW'; + var OriginalMultiByteToWideCharProc: TMultiByteToWideCharProc; *************** *** 44,52 **** if SpecialWndProc(Cardinal(@Original)) then Result := CallWindowProcW(@Original, hWnd, Msg, WParam, LParam) ! else if (@DefWindowProcA = @Original) or (@DefWindowProc = @Original) then Result := CallWindowProcW(@DefWindowProcW, hWnd, Msg, WParam, LParam) ! else if (@DefMDIChildProcA = @Original) or (@DefMDIChildProc = @Original) then Result := CallWindowProcW(@DefMDIChildProcW, hWnd, Msg, WParam, LParam) ! else if (@DefDlgProcA = @Original) or (@DefDlgProc = @Original) then Result := CallWindowProcW(@DefDlgProcW, hWnd, Msg, WParam, LParam) else --- 48,59 ---- if SpecialWndProc(Cardinal(@Original)) then Result := CallWindowProcW(@Original, hWnd, Msg, WParam, LParam) ! else ! if (@DefWindowProcA = @Original) or (@DefWindowProc = @Original) then Result := CallWindowProcW(@DefWindowProcW, hWnd, Msg, WParam, LParam) ! else ! if (@DefMDIChildProcA = @Original) or (@DefMDIChildProc = @Original) then Result := CallWindowProcW(@DefMDIChildProcW, hWnd, Msg, WParam, LParam) ! else ! if (@DefDlgProcA = @Original) or (@DefDlgProc = @Original) then Result := CallWindowProcW(@DefDlgProcW, hWnd, Msg, WParam, LParam) else *************** *** 260,266 **** if (nIndex = GWL_WNDPROC) or (nIndex = DWL_DLGPROC) then begin ! Proc := WndProcConvertW2U(Pointer(dwNewLong), Pointer(@StdWndProcInterceptU2W), Pointer(@StdWndProcInterceptW2U)); Proc := Pointer(SetWindowLongW(hWnd, nIndex, Integer(Proc))); ! Result := Integer(WndProcConvertU2W(Pointer(Proc), Pointer(@StdWndProcInterceptU2W), Pointer(@StdWndProcInterceptW2U))); end else --- 267,275 ---- if (nIndex = GWL_WNDPROC) or (nIndex = DWL_DLGPROC) then begin ! Proc := WndProcConvertW2U(Pointer(dwNewLong), ! Pointer(@StdWndProcInterceptU2W), Pointer(@StdWndProcInterceptW2U)); Proc := Pointer(SetWindowLongW(hWnd, nIndex, Integer(Proc))); ! Result := Integer(WndProcConvertU2W(Pointer(Proc), ! Pointer(@StdWndProcInterceptU2W), Pointer(@StdWndProcInterceptW2U))); end else *************** *** 385,388 **** --- 394,398 ---- X: PUtf8Char; begin + X := nil; L := nMaxCount; if nMaxCount > 0 then *************** *** 421,425 **** end; ! function InsertMenuItemAIntercept(hMenu: HMENU; uItem: UINT; fByPosition: BOOL; const lpmii: TMenuItemInfoA): BOOL; stdcall; var lpmiiw: TMenuItemInfoW; --- 431,436 ---- end; ! function InsertMenuItemAIntercept(hMenu: HMENU; uItem: UINT; fByPosition: BOOL; ! const lpmii: TMenuItemInfoA): BOOL; stdcall; var lpmiiw: TMenuItemInfoW; *************** *** 464,467 **** --- 475,483 ---- function GetOpenFileNameAIntercept(var OpenFileA: TOpenFilenameA): Bool; stdcall; + var + OpenFileW: TOpenFilenameW; + X: PChar; + S: PChar; + L: Integer; function ConvertFilterStringFrom(const S: PChar): PChar; *************** *** 486,490 **** Inc(L); GetMem(Result, L); ! for I := 0 to L-2 do begin if S[I] = #0 then --- 502,506 ---- Inc(L); GetMem(Result, L); ! for I := 0 to L - 2 do begin if S[I] = #0 then *************** *** 506,534 **** if S[I] = #1 then S[I] := #0; ! Inc(i); end; end; - var - OpenFileW: TOpenFilenameW; - X: PChar; - S: PChar; - L: Integer; begin Move(OpenFileA, OpenFileW, SizeOf(TOpenFilenameA)); X := nil; S := nil; - OpenFileW.lpstrFilter := nil; - OpenFileW.lpstrInitialDir := nil; - OpenFileW.lpstrTitle := nil; - OpenFileW.lpstrDefExt := nil; - OpenFileW.lpstrCustomFilter := nil; - OpenFileW.lpstrFile := nil; - OpenFileW.lpstrFileTitle := nil; - OpenFileW.lpTemplateName := nil; try - S := ConvertFilterStringFrom(OpenFileA.lpstrFilter); OpenFileW.lpstrFilter := ConvertFromUTF8(S); --- 522,547 ---- if S[I] = #1 then S[I] := #0; ! Inc(I); end; end; begin Move(OpenFileA, OpenFileW, SizeOf(TOpenFilenameA)); + with OpenFileW do + begin + lpstrFilter := nil; + lpstrInitialDir := nil; + lpstrTitle := nil; + lpstrDefExt := nil; + lpstrCustomFilter := nil; + lpstrFile := nil; + lpstrFileTitle := nil; + lpTemplateName := nil; + end; X := nil; S := nil; try S := ConvertFilterStringFrom(OpenFileA.lpstrFilter); OpenFileW.lpstrFilter := ConvertFromUTF8(S); *************** *** 566,577 **** FreeMem(S); FreeMem(X); ! FreeMem(OpenFileW.lpstrFilter); ! FreeMem(OpenFileW.lpstrInitialDir); ! FreeMem(OpenFileW.lpstrTitle); ! FreeMem(OpenFileW.lpstrDefExt); ! FreeMem(OpenFileW.lpstrFile); ! FreeMem(OpenFileW.lpstrCustomFilter); ! FreeMem(OpenFileW.lpstrFileTitle); ! FreeMem(OpenFileW.lpTemplateName); end; end; --- 579,593 ---- FreeMem(S); FreeMem(X); ! with OpenFileW do ! begin ! FreeMem(lpstrFilter); ! FreeMem(lpstrInitialDir); ! FreeMem(lpstrTitle); ! FreeMem(lpstrDefExt); ! FreeMem(lpstrFile); ! FreeMem(lpstrCustomFilter); ! FreeMem(lpstrFileTitle); ! FreeMem(lpTemplateName); ! end; end; end; *************** *** 583,587 **** if (CodePage = CP_ACP) or (CodePage = CP_THREAD_ACP) then CodePage := CP_UTF8; ! Result := OriginalMultiByteToWideCharProc(CodePage, dwFlags, lpMultiByteStr, cchMultiByte, lpWideCharStr, cchWideChar); end; --- 599,604 ---- if (CodePage = CP_ACP) or (CodePage = CP_THREAD_ACP) then CodePage := CP_UTF8; ! Result := OriginalMultiByteToWideCharProc(CodePage, dwFlags, lpMultiByteStr, cchMultiByte, ! lpWideCharStr, cchWideChar); end; *************** *** 592,596 **** if (CodePage = CP_ACP) or (CodePage = CP_THREAD_ACP) then CodePage := CP_UTF8; ! Result := OriginalWideCharToMultiByteProc(CodePage, dwFlags, lpWideCharStr, cchWideChar, lpMultiByteStr, cchMultiByte, lpDefaultChar, lpUsedDefaultChar); end; --- 609,614 ---- if (CodePage = CP_ACP) or (CodePage = CP_THREAD_ACP) then CodePage := CP_UTF8; ! Result := OriginalWideCharToMultiByteProc(CodePage, dwFlags, lpWideCharStr, cchWideChar, lpMultiByteStr, ! cchMultiByte, lpDefaultChar, lpUsedDefaultChar); end; |
From: Bart v. d. W. <blu...@us...> - 2007-03-18 12:48:50
|
Update of /cvsroot/utf8vcl/utf8vcl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5893 Modified Files: MissingMethods-incomplete.txt TestForm.dfm TestForm.pas UTF8Test.dpr UTF8VCL.pas UTF8VCLCommCtrl.pas Added Files: UTF8VCLControls.pas Log Message: Try to enable support for extended typed characters, a problem in TWinControl was removed, but now you won't get a key event for extended keys, no way to put those keys into a Char argument. --- NEW FILE: UTF8VCLControls.pas --- unit UTF8VCLControls; interface uses Forms, Controls, Messages; type TWinControlPatch = class(TWinControl) private procedure HookTWinControlDoKeyPress; function DoKeyPressPatch(var Message: TWMKey): Boolean; end; procedure HookTWinControlDoKeyPress; implementation uses UTF8VCLUtils; type TProc = function(var Message: TWMKey): Boolean of Object; TProcBreaker = packed record Proc, Self: Pointer; end; procedure HookTWinControlDoKeyPress; begin TWinControlPatch(nil).HookTWinControlDoKeyPress; end; function TWinControlPatch.DoKeyPressPatch(var Message: TWMKey): Boolean; var Form: TCustomForm; Ch: Char; begin Result := True; Form := GetParentForm(Self); if (Form <> nil) and (Form <> TWinControl(Self)) and Form.KeyPreview and TWinControlPatch(Form).DoKeyPress(Message) then Exit; if not (csNoStdEvents in ControlStyle) then with Message do begin if CharCode < 256 then begin Ch := Char(CharCode); KeyPress(Ch); CharCode := Word(Ch); if Char(CharCode) = #0 then Exit; end; end; Result := False; end; procedure TWinControlPatch.HookTWinControlDoKeyPress; var a, b: TProc; m: TWMKey; begin a := DoKeyPress; b := DoKeyPressPatch; InjectJumpHook(TProcBreaker(a).Proc, TProcBreaker(b).Proc); end; end. Index: MissingMethods-incomplete.txt =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/MissingMethods-incomplete.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MissingMethods-incomplete.txt 15 Mar 2007 12:09:49 -0000 1.5 --- MissingMethods-incomplete.txt 16 Mar 2007 23:39:11 -0000 1.6 *************** *** 1,2 **** --- 1,7 ---- + Special methods that need patching: + Controls.TWinControl.DoKeyPress + + + GetTextMetricsA CompareStringA Index: UTF8VCL.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCL.pas,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** UTF8VCL.pas 15 Mar 2007 12:09:49 -0000 1.14 --- UTF8VCL.pas 16 Mar 2007 23:39:11 -0000 1.15 *************** *** 17,21 **** uses Windows, Messages, SysUtils, Classes, ! UTF8VCLUtils, UTF8VCLMessages; { --- 17,21 ---- uses Windows, Messages, SysUtils, Classes, ! UTF8VCLUtils, UTF8VCLMessages, UTF8VCLControls; { *************** *** 508,511 **** --- 508,513 ---- if Active then begin + HookTWinControlDoKeyPress; + HookUser32Func('SendMessageA', @SendMessageAIntercept); // do not localize HookUser32Func('PostMessageA', @PostMessageAIntercept); // do not localize Index: TestForm.dfm =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.dfm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** TestForm.dfm 15 Mar 2007 12:09:49 -0000 1.10 --- TestForm.dfm 16 Mar 2007 23:39:11 -0000 1.11 *************** *** 5,10 **** BorderStyle = bsSingle Caption = 'Form1' ! ClientHeight = 435 ! ClientWidth = 657 Color = clBtnFace Font.Charset = ANSI_CHARSET --- 5,10 ---- BorderStyle = bsSingle Caption = 'Form1' ! ClientHeight = 406 ! ClientWidth = 613 Color = clBtnFace Font.Charset = ANSI_CHARSET *************** *** 17,41 **** Position = poScreenCenter PixelsPerInch = 96 ! TextHeight = 15 object Label1: TLabel ! Left = 8 ! Top = 8 Width = 32 ! Height = 15 Caption = 'Label1' end object Edit1: TEdit ! Left = 8 ! Top = 30 ! Width = 210 ! Height = 23 TabOrder = 0 Text = 'Edit1' end object Memo1: TMemo ! Left = 8 ! Top = 60 ! Width = 210 ! Height = 45 Ctl3D = True Lines.Strings = ( --- 17,42 ---- Position = poScreenCenter PixelsPerInch = 96 ! TextHeight = 14 object Label1: TLabel ! Left = 7 ! Top = 7 Width = 32 ! Height = 14 Caption = 'Label1' end object Edit1: TEdit ! Left = 7 ! Top = 28 ! Width = 196 ! Height = 22 TabOrder = 0 Text = 'Edit1' + OnChange = Edit1Change end object Memo1: TMemo ! Left = 7 ! Top = 56 ! Width = 196 ! Height = 42 Ctl3D = True Lines.Strings = ( *************** *** 45,77 **** end object Button1: TButton ! Left = 8 ! Top = 113 ! Width = 69 ! Height = 22 Caption = 'Button1' TabOrder = 2 end object CheckBox1: TCheckBox ! Left = 83 ! Top = 113 ! Width = 135 ! Height = 15 Caption = 'CheckBox1' TabOrder = 3 end object RadioButton1: TRadioButton ! Left = 224 ! Top = 172 ! Width = 174 ! Height = 16 Caption = 'RadioButton1' TabOrder = 4 end object ListBox1: TListBox ! Left = 8 ! Top = 143 ! Width = 210 ! Height = 45 ! ItemHeight = 15 Items.Strings = ( 'ListBox1') --- 46,78 ---- end object Button1: TButton ! Left = 7 ! Top = 105 ! Width = 65 ! Height = 21 Caption = 'Button1' TabOrder = 2 end object CheckBox1: TCheckBox ! Left = 77 ! Top = 105 ! Width = 126 ! Height = 14 Caption = 'CheckBox1' TabOrder = 3 end object RadioButton1: TRadioButton ! Left = 209 ! Top = 161 ! Width = 162 ! Height = 14 Caption = 'RadioButton1' TabOrder = 4 end object ListBox1: TListBox ! Left = 7 ! Top = 133 ! Width = 196 ! Height = 42 ! ItemHeight = 14 Items.Strings = ( 'ListBox1') *************** *** 79,87 **** end object ComboBox1: TComboBox ! Left = 224 ! Top = 143 ! Width = 174 ! Height = 23 ! ItemHeight = 15 TabOrder = 6 Text = 'ComboBox1' --- 80,88 ---- end object ComboBox1: TComboBox ! Left = 209 ! Top = 133 ! Width = 162 ! Height = 22 ! ItemHeight = 14 TabOrder = 6 Text = 'ComboBox1' *************** *** 90,105 **** end object GroupBox1: TGroupBox ! Left = 224 ! Top = 90 ! Width = 174 ! Height = 45 Caption = 'GroupBox1' TabOrder = 7 end object Button2: TButton ! Left = 567 ! Top = 399 ! Width = 71 ! Height = 24 Caption = 'Translate' TabOrder = 8 --- 91,106 ---- end object GroupBox1: TGroupBox ! Left = 209 ! Top = 84 ! Width = 162 ! Height = 42 Caption = 'GroupBox1' TabOrder = 7 end object Button2: TButton ! Left = 529 ! Top = 372 ! Width = 66 ! Height = 23 Caption = 'Translate' TabOrder = 8 *************** *** 107,114 **** end object Button3: TButton ! Left = 473 ! Top = 398 ! Width = 70 ! Height = 24 Caption = 'SomeTests' TabOrder = 9 --- 108,115 ---- end object Button3: TButton ! Left = 441 ! Top = 371 ! Width = 66 ! Height = 23 Caption = 'SomeTests' TabOrder = 9 *************** *** 116,123 **** end object RichEdit1: TRichEdit ! Left = 224 Top = 0 ! Width = 174 ! Height = 83 Lines.Strings = ( 'RichEdit1') --- 117,124 ---- end object RichEdit1: TRichEdit ! Left = 209 Top = 0 ! Width = 162 ! Height = 77 Lines.Strings = ( 'RichEdit1') *************** *** 125,132 **** end object StringGrid1: TStringGrid ! Left = 403 Top = 0 ! Width = 232 ! Height = 129 ColCount = 3 RowCount = 4 --- 126,133 ---- end object StringGrid1: TStringGrid ! Left = 376 Top = 0 ! Width = 217 ! Height = 120 ColCount = 3 RowCount = 4 *************** *** 139,152 **** end object ListView1: TListView ! Left = 400 ! Top = 136 ! Width = 241 ! Height = 113 Columns = < item Caption = 'Column1' end item Caption = 'Column2' end> GridLines = True --- 140,155 ---- end object ListView1: TListView ! Left = 373 ! Top = 127 ! Width = 225 ! Height = 105 Columns = < item Caption = 'Column1' + Width = 47 end item Caption = 'Column2' + Width = 47 end> GridLines = True *************** *** 159,166 **** end object Activate: TButton ! Left = 8 ! Top = 400 ! Width = 137 ! Height = 25 Caption = 'Activate UTF8 support' Enabled = False --- 162,169 ---- end object Activate: TButton ! Left = 7 ! Top = 373 ! Width = 128 ! Height = 24 Caption = 'Activate UTF8 support' Enabled = False *************** *** 168,175 **** end object Deactivate: TButton ! Left = 152 ! Top = 400 ! Width = 137 ! Height = 25 Caption = 'Deactivate UTF8 support' Enabled = False --- 171,178 ---- end object Deactivate: TButton ! Left = 142 ! Top = 373 ! Width = 128 ! Height = 24 Caption = 'Deactivate UTF8 support' Enabled = False *************** *** 177,184 **** end object Button4: TButton ! Left = 385 ! Top = 398 ! Width = 70 ! Height = 24 Caption = 'FatalAppExit' TabOrder = 15 --- 180,187 ---- end object Button4: TButton ! Left = 359 ! Top = 371 ! Width = 66 ! Height = 23 Caption = 'FatalAppExit' TabOrder = 15 Index: UTF8Test.dpr =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8Test.dpr,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** UTF8Test.dpr 7 Mar 2007 19:28:19 -0000 1.2 --- UTF8Test.dpr 16 Mar 2007 23:39:11 -0000 1.3 *************** *** 1,4 **** --- 1,7 ---- program UTF8Test; + {%File 'MissingMethods-incomplete.txt'} + {%File 'MissingWindowMessages-incomplete.txt'} + uses ShareMem, *************** *** 7,11 **** UTF8VCLUtils in 'UTF8VCLUtils.pas', Forms, ! TestForm in 'TestForm.pas' {Form1}; {$R *.res} --- 10,15 ---- UTF8VCLUtils in 'UTF8VCLUtils.pas', Forms, ! TestForm in 'TestForm.pas' {Form1}, ! UTF8VCLControls in 'UTF8VCLControls.pas'; {$R *.res} Index: UTF8VCLCommCtrl.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCLCommCtrl.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UTF8VCLCommCtrl.pas 13 Mar 2007 21:30:42 -0000 1.1 --- UTF8VCLCommCtrl.pas 16 Mar 2007 23:39:11 -0000 1.2 *************** *** 1,49 **** ! function CreatePropertySheetPage; external cctrl name 'CreatePropertySheetPageA'; ! function CreatePropertySheetPageA; external cctrl name 'CreatePropertySheetPageA'; ! function CreatePropertySheetPageW; external cctrl name 'CreatePropertySheetPageW'; ! function DestroyPropertySheetPage; external cctrl name 'DestroyPropertySheetPage'; ! function PropertySheet; external cctrl name 'PropertySheetA'; ! function PropertySheetA; external cctrl name 'PropertySheetA'; ! function PropertySheetW; external cctrl name 'PropertySheetW'; ! ! function ImageList_LoadImage; external cctrl name 'ImageList_LoadImageA'; ! function ImageList_LoadImageA; external cctrl name 'ImageList_LoadImageA'; ! function ImageList_LoadImageW; external cctrl name 'ImageList_LoadImageW'; ! ! procedure DrawStatusText; external cctrl name 'DrawStatusTextA'; ! procedure DrawStatusTextA; external cctrl name 'DrawStatusTextA'; ! procedure DrawStatusTextW; external cctrl name 'DrawStatusTextW'; ! function CreateStatusWindow; external cctrl name 'CreateStatusWindowA'; ! function CreateStatusWindowA; external cctrl name 'CreateStatusWindowA'; ! function CreateStatusWindowW; external cctrl name 'CreateStatusWindowW'; ! ! ! delphi seems to use the callback method to provide windows with the text ! ! LVM_SETUNICODEFORMAT ! ! LVM_GETITEM ! LVM_SETITEM ! LVM_INSERTITEM ! ! LVM_FINDITEM ! LVM_GETSTRINGWIDTH ! LVM_HITTEST? ! ! LVM_GETCOLUMN ! LVM_SETCOLUMN ! LVM_INSERTCOLUMN ! ! LVM_GETITEMTEXT ! LVM_SETITEMTEXT ! ! LVM_SORTITEMS ! LVM_GETISEARCHSTRING ! ! and the callback of ! ! LVN_GETDISPINFO ! LVN_ODFINDITEM ! ! ! and alot more of the HDM_* and TVM_* --- 1,49 ---- ! function CreatePropertySheetPage; external cctrl name 'CreatePropertySheetPageA'; ! function CreatePropertySheetPageA; external cctrl name 'CreatePropertySheetPageA'; ! function CreatePropertySheetPageW; external cctrl name 'CreatePropertySheetPageW'; ! function DestroyPropertySheetPage; external cctrl name 'DestroyPropertySheetPage'; ! function PropertySheet; external cctrl name 'PropertySheetA'; ! function PropertySheetA; external cctrl name 'PropertySheetA'; ! function PropertySheetW; external cctrl name 'PropertySheetW'; ! ! function ImageList_LoadImage; external cctrl name 'ImageList_LoadImageA'; ! function ImageList_LoadImageA; external cctrl name 'ImageList_LoadImageA'; ! function ImageList_LoadImageW; external cctrl name 'ImageList_LoadImageW'; ! ! procedure DrawStatusText; external cctrl name 'DrawStatusTextA'; ! procedure DrawStatusTextA; external cctrl name 'DrawStatusTextA'; ! procedure DrawStatusTextW; external cctrl name 'DrawStatusTextW'; ! function CreateStatusWindow; external cctrl name 'CreateStatusWindowA'; ! function CreateStatusWindowA; external cctrl name 'CreateStatusWindowA'; ! function CreateStatusWindowW; external cctrl name 'CreateStatusWindowW'; ! ! ! delphi seems to use the callback method to provide windows with the text ! ! LVM_SETUNICODEFORMAT ! ! LVM_GETITEM ! LVM_SETITEM ! LVM_INSERTITEM ! ! LVM_FINDITEM ! LVM_GETSTRINGWIDTH ! LVM_HITTEST? ! ! LVM_GETCOLUMN ! LVM_SETCOLUMN ! LVM_INSERTCOLUMN ! ! LVM_GETITEMTEXT ! LVM_SETITEMTEXT ! ! LVM_SORTITEMS ! LVM_GETISEARCHSTRING ! ! and the callback of ! ! LVN_GETDISPINFO ! LVN_ODFINDITEM ! ! ! and alot more of the HDM_* and TVM_* Index: TestForm.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.pas,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** TestForm.pas 15 Mar 2007 12:09:49 -0000 1.15 --- TestForm.pas 16 Mar 2007 23:39:11 -0000 1.16 *************** *** 38,41 **** --- 38,42 ---- procedure Button3Click(Sender: TObject); procedure Button4Click(Sender: TObject); + procedure Edit1Change(Sender: TObject); public end; *************** *** 115,118 **** --- 116,120 ---- ListView1.Items[1].Caption := TestText; ListView1.Items[0].SubItems[0] := TestText; + CheckTranslation(ListView1.Name, ListView1.Items[0].SubItems[0]); ListView1.Items[1].SubItems[0] := TestText; end; *************** *** 238,241 **** --- 240,248 ---- end; + procedure TForm1.Edit1Change(Sender: TObject); + begin + Sender := Sender; + end; + end. |
From: Robert M. <mar...@us...> - 2007-03-18 11:49:23
|
Update of /cvsroot/utf8vcl/utf8vcl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2263 Modified Files: TestForm.dfm TestForm.pas UTF8VCLMessages.pas UTF8VCLUtils.pas Log Message: some fiddling with the sources, added more test components, TPanel buggy Index: TestForm.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.pas,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** TestForm.pas 16 Mar 2007 23:39:11 -0000 1.16 --- TestForm.pas 18 Mar 2007 07:56:10 -0000 1.17 *************** *** 11,15 **** uses Windows, SysUtils, Classes, Controls, Forms, ! Dialogs, ComCtrls, StdCtrls, Menus, Grids; type --- 11,15 ---- uses Windows, SysUtils, Classes, Controls, Forms, ! Dialogs, ComCtrls, StdCtrls, Menus, Grids, ValEdit, Buttons, ExtCtrls; type *************** *** 35,38 **** --- 35,43 ---- Deactivate: TButton; Button4: TButton; + BitBtn1: TBitBtn; + SpeedButton1: TSpeedButton; + StaticText1: TStaticText; + ValueListEditor1: TValueListEditor; + Panel1: TPanel; procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); *************** *** 118,121 **** --- 123,142 ---- CheckTranslation(ListView1.Name, ListView1.Items[0].SubItems[0]); ListView1.Items[1].SubItems[0] := TestText; + BitBtn1.Caption := TestText; + CheckTranslation(BitBtn1.Name, BitBtn1.Caption); + SpeedButton1.Caption := TestText; + CheckTranslation(SpeedButton1.Name, SpeedButton1.Caption); + StaticText1.Caption := TestText; + CheckTranslation(StaticText1.Name, StaticText1.Caption); + Panel1.Caption := TestText; + CheckTranslation(StaticText1.Name, Panel1.Caption); + ValueListEditor1.TitleCaptions[0] := TestText; + CheckTranslation(ValueListEditor1.Name, ValueListEditor1.TitleCaptions[0]); + ValueListEditor1.TitleCaptions[1] := TestText; + CheckTranslation(ValueListEditor1.Name, ValueListEditor1.TitleCaptions[1]); + ValueListEditor1.Keys[1] := TestText; + CheckTranslation(ValueListEditor1.Name, ValueListEditor1.Keys[1]); + ValueListEditor1.Values[TestText] := TestText; + CheckTranslation(ValueListEditor1.Name, ValueListEditor1.Values[TestText]); end; Index: UTF8VCLUtils.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCLUtils.pas,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** UTF8VCLUtils.pas 17 Mar 2007 21:48:28 -0000 1.11 --- UTF8VCLUtils.pas 18 Mar 2007 07:56:10 -0000 1.12 *************** *** 242,248 **** if LenOut = 0 then RaiseLastOSError; ! GetMem(Result, SizeOf(WideChar) * (LenOut + 2)); Result[LenOut] := #0; - Result[LenOut + 1] := #0; if MultiByteToWideChar(CP_UTF8, 0, lpUTF8, LenIn, Result, LenOut + 1) = 0 then RaiseLastOSError; --- 242,247 ---- if LenOut = 0 then RaiseLastOSError; ! GetMem(Result, SizeOf(WideChar) * (LenOut + 1)); Result[LenOut] := #0; if MultiByteToWideChar(CP_UTF8, 0, lpUTF8, LenIn, Result, LenOut + 1) = 0 then RaiseLastOSError; *************** *** 281,285 **** if LenOut = 0 then RaiseLastOSError; ! GetMem(Result, SizeOf(Utf8Byte) * (LenOut + 2)); Result[LenOut] := #0; if WideCharToMultiByte(CP_UTF8, 0, lpWide, LenIn, Result, LenOut, nil, nil) = 0 then --- 280,284 ---- if LenOut = 0 then RaiseLastOSError; ! GetMem(Result, SizeOf(Utf8Byte) * (LenOut + 1)); Result[LenOut] := #0; if WideCharToMultiByte(CP_UTF8, 0, lpWide, LenIn, Result, LenOut, nil, nil) = 0 then Index: TestForm.dfm =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.dfm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** TestForm.dfm 16 Mar 2007 23:39:11 -0000 1.11 --- TestForm.dfm 18 Mar 2007 07:56:10 -0000 1.12 *************** *** 25,28 **** --- 25,35 ---- Caption = 'Label1' end + object SpeedButton1: TSpeedButton + Left = 96 + Top = 184 + Width = 81 + Height = 22 + Caption = 'SpeedButton1' + end object Edit1: TEdit Left = 7 *************** *** 188,191 **** --- 195,235 ---- OnClick = Button4Click end + object BitBtn1: TBitBtn + Left = 8 + Top = 184 + Width = 75 + Height = 25 + Caption = 'BitBtn1' + TabOrder = 16 + end + object StaticText1: TStaticText + Left = 200 + Top = 184 + Width = 58 + Height = 18 + Caption = 'StaticText1' + TabOrder = 17 + end + object ValueListEditor1: TValueListEditor + Left = 8 + Top = 216 + Width = 273 + Height = 49 + DisplayOptions = [doColumnTitles, doAutoColResize] + Strings.Strings = ( + 'KeyItem=ValueItem') + TabOrder = 18 + ColWidths = ( + 133 + 134) + end + object Panel1: TPanel + Left = 288 + Top = 240 + Width = 121 + Height = 41 + Caption = 'Panel1' + TabOrder = 19 + end object MainMenu1: TMainMenu Left = 104 Index: UTF8VCLMessages.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCLMessages.pas,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** UTF8VCLMessages.pas 17 Mar 2007 21:48:28 -0000 1.19 --- UTF8VCLMessages.pas 18 Mar 2007 07:56:10 -0000 1.20 *************** *** 12,16 **** uses ! Messages, Windows, UTF8VCLUtils; procedure MessageW2UBefore(hWnd: HWND; Msg: UINT; InWParam: WPARAM; InLParam: LPARAM; --- 12,16 ---- uses ! Windows, UTF8VCLUtils; procedure MessageW2UBefore(hWnd: HWND; Msg: UINT; InWParam: WPARAM; InLParam: LPARAM; *************** *** 25,28 **** --- 25,31 ---- implementation + uses + Messages, SysUtils; + const UnusedWParam = WPARAM(0); *************** *** 45,49 **** begin Inc(L); // wparam needs space for the trailing zero ! GetMem(Pointer(OutLParam), SizeOf(Utf8Byte) * L) end else --- 48,52 ---- begin Inc(L); // wparam needs space for the trailing zero ! GetMem(Pointer(OutLParam), SizeOf(Utf8Byte) * L); end else *************** *** 92,96 **** EM_LINELENGTH, EM_LINEINDEX, EM_GETSEL, EM_SETSEL: begin - end; else --- 95,98 ---- |
From: Bart v. d. W. <blu...@us...> - 2007-03-18 11:26:47
|
Update of /cvsroot/utf8vcl/utf8vcl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23150 Modified Files: TestForm.dfm TestForm.pas UTF8VCL.pas UTF8VCLUtils.pas Log Message: Fixed a bug in the SetWindowLong function that caused the OpenFile dialog to overflow its stack, possibly some other bugs too. Added initial support for OpenFile dialog. Added better hooks for some of the DefProc thingies. Index: UTF8VCLUtils.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCLUtils.pas,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** UTF8VCLUtils.pas 18 Mar 2007 07:56:10 -0000 1.12 --- UTF8VCLUtils.pas 18 Mar 2007 11:26:41 -0000 1.13 *************** *** 29,32 **** --- 29,35 ---- function IsW2UWndProc(Potential: Pointer): Boolean; + function WrapWndProcU2W(Proc: Pointer; Intercept: TStdWndProcInterceptDef): Pointer; + function WrapWndProcW2U(Proc: Pointer; Intercept: TStdWndProcInterceptDef): Pointer; + procedure InjectJumpHook(OrgProc, NewProc: Pointer); function ReplaceImport(ModuleBase: Pointer; OrgProc, ToProc: Pointer): Boolean; Index: UTF8VCL.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCL.pas,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** UTF8VCL.pas 17 Mar 2007 21:48:28 -0000 1.16 --- UTF8VCL.pas 18 Mar 2007 11:26:40 -0000 1.17 *************** *** 16,20 **** uses ! Windows, Messages, SysUtils, Classes, UTF8VCLUtils, UTF8VCLMessages, UTF8VCLControls; --- 16,20 ---- uses ! Windows, Messages, SysUtils, Classes, CommDlg, UTF8VCLUtils, UTF8VCLMessages, UTF8VCLControls; *************** *** 32,40 **** if SpecialWndProc(Cardinal(@Original)) then Result := CallWindowProcW(@Original, hWnd, Msg, WParam, LParam) ! else ! if (@DefWindowProcA = @Original) or (@DefWindowProc = @Original) or ! (@DefFrameProcA = @Original) or (@DefFrameProc = @Original) or ! (@DefMDIChildProcA = @Original) or (@DefMDIChildProc = @Original) then Result := CallWindowProcW(@DefWindowProcW, hWnd, Msg, WParam, LParam) else begin --- 32,41 ---- if SpecialWndProc(Cardinal(@Original)) then Result := CallWindowProcW(@Original, hWnd, Msg, WParam, LParam) ! else if (@DefWindowProcA = @Original) or (@DefWindowProc = @Original) then Result := CallWindowProcW(@DefWindowProcW, hWnd, Msg, WParam, LParam) + else if (@DefMDIChildProcA = @Original) or (@DefMDIChildProc = @Original) then + Result := CallWindowProcW(@DefMDIChildProcW, hWnd, Msg, WParam, LParam) + else if (@DefDlgProcA = @Original) or (@DefDlgProc = @Original) then + Result := CallWindowProcW(@DefDlgProcW, hWnd, Msg, WParam, LParam) else begin *************** *** 60,71 **** TempWParam, TempLParam: Longint; begin ! if LongWord(GetWindowLong(hWnd, GWL_HINSTANCE)) = HInstance then ! begin ! MessageU2WBefore(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Pointer(@SendMessageW)); ! Result := SendMessageW(hWnd, Msg, TempWParam, TempLParam); ! Result := MessageU2WAfter(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Result, Pointer(@SendMessageW)); ! end ! else ! Result := SendMessageA(hWnd, Msg, WParam, LParam); end; --- 61,67 ---- TempWParam, TempLParam: Longint; begin ! MessageU2WBefore(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Pointer(@SendMessageW)); ! Result := SendMessageW(hWnd, Msg, TempWParam, TempLParam); ! Result := MessageU2WAfter(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Result, Pointer(@SendMessageW)); end; *************** *** 74,85 **** TempWParam, TempLParam: Longint; begin ! if LongWord(GetWindowLong(hWnd, GWL_HINSTANCE)) = HInstance then ! begin ! MessageU2WBefore(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Pointer(@PostMessageW)); ! Result := PostMessageW(hWnd, Msg, TempWParam, TempLParam); ! MessageU2WAfter(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, 0, Pointer(@PostMessageW)); ! end ! else ! Result := PostMessageA(hWnd, Msg, WParam, LParam); end; --- 70,76 ---- TempWParam, TempLParam: Longint; begin ! MessageU2WBefore(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Pointer(@PostMessageW)); ! Result := PostMessageW(hWnd, Msg, TempWParam, TempLParam); ! MessageU2WAfter(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, 0, Pointer(@PostMessageW)); end; *************** *** 90,99 **** var TempWParam, TempLParam: Longint; begin ! // the proc does a reverse convert ! TStdWndProcDef(lpPrevWndFunc) := WndProcConvertW2U(lpPrevWndFunc, StdWndProcInterceptU2W, StdWndProcInterceptW2U); ! MessageU2WBefore(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, TStdWndProcDef(lpPrevWndFunc)); ! Result := CallWindowProcW(lpPrevWndFunc, hWnd, Msg, TempWParam, TempLParam); ! Result := MessageU2WAfter(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Result, TStdWndProcDef(lpPrevWndFunc)); end; --- 81,91 ---- var TempWParam, TempLParam: Longint; + Proc: Pointer; begin ! TStdWndProcDef(Proc) := WndProcConvertW2U(lpPrevWndFunc, StdWndProcInterceptU2W, StdWndProcInterceptW2U); ! ! MessageU2WBefore(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, TStdWndProcDef(Proc)); ! Result := CallWindowProcW(Proc, hWnd, Msg, TempWParam, TempLParam); ! Result := MessageU2WAfter(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Result, TStdWndProcDef(Proc)); end; *************** *** 139,143 **** WndClassW.lpfnWndProc := WndProcConvertW2U(WndClassA.lpfnWndProc, Pointer(@StdWndProcInterceptU2W), Pointer(@StdWndProcInterceptW2U)); - //WndClassW.hInstance := hInstance; // the WndProc is now in this module WndClassW.lpszMenuName := ConvertFromUTF8(WndClassA.lpszMenuName); WndClassW.lpszClassName := ConvertFromUTF8(WndClassA.lpszClassName); --- 131,134 ---- *************** *** 159,163 **** WndClassW.lpfnWndProc := WndProcConvertW2U(WndClassA.lpfnWndProc, Pointer(@StdWndProcInterceptU2W), Pointer(@StdWndProcInterceptW2U)); - //WndClassW.hInstance := hInstance; // the WndProc is now in this module WndClassW.lpszMenuName := ConvertFromUTF8(WndClassA.lpszMenuName); WndClassW.lpszClassName := ConvertFromUTF8(WndClassA.lpszClassName); --- 150,153 ---- *************** *** 259,264 **** begin Proc := WndProcConvertW2U(Pointer(dwNewLong), Pointer(@StdWndProcInterceptU2W), Pointer(@StdWndProcInterceptW2U)); ! SetWindowLongW(hWnd, nIndex, Integer(Proc)); ! Result := dwNewLong; end else --- 249,254 ---- begin Proc := WndProcConvertW2U(Pointer(dwNewLong), Pointer(@StdWndProcInterceptU2W), Pointer(@StdWndProcInterceptW2U)); ! Proc := Pointer(SetWindowLongW(hWnd, nIndex, Integer(Proc))); ! Result := Integer(WndProcConvertU2W(Pointer(Proc), Pointer(@StdWndProcInterceptU2W), Pointer(@StdWndProcInterceptW2U))); end else *************** *** 299,303 **** C := ConvertFromUTF8(lpClassName) else ! // (rom) suspicious. The string stays ANSI. GetClassInfoW may complain. C := PWideChar(lpClassName); try --- 289,293 ---- C := ConvertFromUTF8(lpClassName) else ! // This isn't a string but a special id C := PWideChar(lpClassName); try *************** *** 326,330 **** C := ConvertFromUTF8(ClassName) else ! // (rom) suspicious. The string stays ANSI. GetClassInfoExW may complain. C := PWideChar(ClassName); try --- 316,320 ---- C := ConvertFromUTF8(ClassName) else ! // This isn't a string but a special id C := PWideChar(ClassName); try *************** *** 359,362 **** --- 349,370 ---- end; + function DefMDIChildProcAIntercept(hWnd: HWND; Msg: UINT; WParam: WPARAM; LParam: LPARAM): LRESULT; stdcall; + var + TempWParam, TempLParam: Longint; + begin + MessageU2WBefore(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Pointer(nil)); + Result := DefMDIChildProcW(hWnd, Msg, TempWParam, TempLParam); + Result := MessageU2WAfter(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Result, Pointer(nil)); + end; + + function DefDlgProcAIntercept(hWnd: HWND; Msg: UINT; WParam: WPARAM; LParam: LPARAM): LRESULT; stdcall; + var + TempWParam, TempLParam: Longint; + begin + MessageU2WBefore(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Pointer(@DefDlgProcW)); + Result := DefDlgProcW(hWnd, Msg, TempWParam, TempLParam); + Result := MessageU2WAfter(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Result, Pointer(@DefDlgProcW)); + end; + function GetWindowTextAIntercept(hWnd: HWND; lpString: PAnsiChar; nMaxCount: Integer): Integer; stdcall; var *************** *** 442,445 **** --- 450,567 ---- end; + function GetOpenFileNameAIntercept(var OpenFileA: TOpenFilenameA): Bool; stdcall; + + function ConvertFilterStringFrom(const S: PChar): PChar; + var + I, L: Integer; + P: Boolean; + begin + L := 0; + P := False; + while Assigned(S) and not (P and (S[L] = #0)) do + begin + P := S[L] = #0; + Inc(L); + end; + if L = 0 then + begin + Result := nil; + Exit; + end + else + begin + Inc(L); + GetMem(Result, L); + for I := 0 to L-2 do + begin + if S[I] = #0 then + Result[I] := #1 + else + Result[I] := S[I]; + end; + Result[L-1] := #0; + end; + end; + + procedure ConvertFilterStringTo(S: PWideChar); + var + I: Integer; + begin + I := 0; + while Assigned(S) and (S[I] <> #0) do + begin + if S[I] = #1 then + S[I] := #0; + Inc(i); + end; + end; + + var + OpenFileW: TOpenFilenameW; + X: PChar; + S: PChar; + L: Integer; + begin + Move(OpenFileA, OpenFileW, SizeOf(TOpenFilenameA)); + + X := nil; + S := nil; + + OpenFileW.lpstrFilter := nil; + OpenFileW.lpstrInitialDir := nil; + OpenFileW.lpstrTitle := nil; + OpenFileW.lpstrDefExt := nil; + OpenFileW.lpstrCustomFilter := nil; + OpenFileW.lpstrFile := nil; + OpenFileW.lpstrFileTitle := nil; + OpenFileW.lpTemplateName := nil; + try + + S := ConvertFilterStringFrom(OpenFileA.lpstrFilter); + OpenFileW.lpstrFilter := ConvertFromUTF8(S); + ConvertFilterStringTo(OpenFileW.lpstrFilter); + + OpenFileW.lpstrInitialDir := ConvertFromUTF8(OpenFileA.lpstrInitialDir); + OpenFileW.lpstrTitle := ConvertFromUTF8(OpenFileA.lpstrTitle); + OpenFileW.lpstrDefExt := ConvertFromUTF8(OpenFileA.lpstrDefExt); + OpenFileW.lpTemplateName := ConvertFromUTF8(OpenFileA.lpTemplateName); + + OpenFileW.lpstrFile := ConvertFromUTF8(OpenFileA.lpstrFile); + if OpenFileA.nMaxFile <> 0 then + ReallocMem(OpenFileW.lpstrFile, OpenFileA.nMaxFile*2 + 4); + OpenFileW.lpstrCustomFilter := ConvertFromUTF8(OpenFileA.lpstrCustomFilter); + if OpenFileA.nMaxCustFilter <> 0 then + ReallocMem(OpenFileW.lpstrCustomFilter, OpenFileA.nMaxCustFilter*2 + 4); + OpenFileW.lpstrFileTitle := ConvertFromUTF8(OpenFileA.lpstrFileTitle); + if OpenFileA.nMaxFileTitle <> 0 then + ReallocMem(OpenFileW.lpstrFileTitle, OpenFileA.nMaxFileTitle*2 + 4); + + OpenFileW.lpfnHook := WndProcConvertW2U(Pointer(@OpenFileA.lpfnHook), + Pointer(@StdWndProcInterceptU2W), Pointer(@StdWndProcInterceptW2U)); + + Result := GetOpenFileNameW(OpenFileW); + + X := ConvertToUTF8(OpenFileW.lpstrFile, -1, L); + CopyMemory(OpenFileA.lpstrFile, X, L+1); + FreeMem(X); + X := ConvertToUTF8(OpenFileW.lpstrCustomFilter, -1, L); + CopyMemory(OpenFileA.lpstrCustomFilter, X, L+1); + FreeMem(X); + X := ConvertToUTF8(OpenFileW.lpstrFileTitle, -1, L); + CopyMemory(OpenFileA.lpstrFileTitle, X, L+1); + finally + FreeMem(S); + FreeMem(X); + FreeMem(OpenFileW.lpstrFilter); + FreeMem(OpenFileW.lpstrInitialDir); + FreeMem(OpenFileW.lpstrTitle); + FreeMem(OpenFileW.lpstrDefExt); + FreeMem(OpenFileW.lpstrFile); + FreeMem(OpenFileW.lpstrCustomFilter); + FreeMem(OpenFileW.lpstrFileTitle); + FreeMem(OpenFileW.lpTemplateName); + end; + end; + procedure FatalAppExitAIntercept(uAction: UINT; lpMessageText: PAnsiChar); stdcall; var *************** *** 459,462 **** --- 581,588 ---- LibGdi32: HMODULE = 0; LibKernel32: HMODULE = 0; + LibCommdlg32: HMODULE = 0; + + const + commdlg32 = 'comdlg32.dll'; function HookFunc(const FunctionName: PChar; NewFunc: Pointer; var Module: HMODULE; const ModuleName: PChar): Pointer; *************** *** 486,489 **** --- 612,620 ---- end; + function HookCommdlg32Func(const FunctionName: PChar; NewFunc: Pointer): Pointer; + begin + Result := HookFunc(FunctionName, NewFunc, LibCommdlg32, commdlg32); + end; + var ActiveState: Boolean = False; *************** *** 512,516 **** --- 643,651 ---- HookUser32Func('IsWindowUnicode', @IsWindowUnicodeIntercept); // do not localize HookUser32Func('GetWindowLongA', @GetWindowLongAIntercept); // do not localize + HookUser32Func('DefWindowProcA', @DefWindowProcAIntercept); // do not localize + HookUser32Func('DefMDIChildProcA', @DefMDIChildProcAIntercept); // do not localize + HookUser32Func('DefDlgProcA', @DefDlgProcAIntercept); // do not localize + HookUser32Func('GetWindowTextA', @GetWindowTextAIntercept); // do not localize HookUser32Func('InsertMenuA', @InsertMenuAIntercept); // do not localize *************** *** 525,528 **** --- 660,665 ---- HookKernel32Func('OutputDebugStringA', @OutputDebugStringAIntercept); // do not localize HookKernel32Func('FatalAppExitA', @FatalAppExitAIntercept); // do not localize + + HookCommdlg32Func('GetOpenFileNameA', @GetOpenFileNameAIntercept); // do not localize end else Index: TestForm.dfm =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.dfm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TestForm.dfm 18 Mar 2007 07:56:10 -0000 1.12 --- TestForm.dfm 18 Mar 2007 11:26:40 -0000 1.13 *************** *** 39,43 **** TabOrder = 0 Text = 'Edit1' - OnChange = Edit1Change end object Memo1: TMemo --- 39,42 ---- *************** *** 242,244 **** --- 241,252 ---- end end + object OpenDialog1: TOpenDialog + DefaultExt = 'OpenDialog1' + FileName = 'OpenDialog1' + Filter = 'OpenDialog1' + InitialDir = 'OpenDialog1' + Title = 'OpenDialog1' + Left = 8 + Top = 336 + end end Index: TestForm.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.pas,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** TestForm.pas 18 Mar 2007 07:56:10 -0000 1.17 --- TestForm.pas 18 Mar 2007 11:26:40 -0000 1.18 *************** *** 40,47 **** ValueListEditor1: TValueListEditor; Panel1: TPanel; procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button4Click(Sender: TObject); - procedure Edit1Change(Sender: TObject); public end; --- 40,47 ---- ValueListEditor1: TValueListEditor; Panel1: TPanel; + OpenDialog1: TOpenDialog; procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button4Click(Sender: TObject); public end; *************** *** 146,149 **** --- 146,151 ---- Content: string; begin + OpenDialog1.Execute; + Content := Menu1.Caption; Content := menuItem1.Caption; *************** *** 261,269 **** end; - procedure TForm1.Edit1Change(Sender: TObject); - begin - Sender := Sender; - end; - end. --- 263,266 ---- |
From: Bart v. d. W. <bw...@xs...> - 2007-03-16 22:16:28
|
Welcome to the mailing lists of utf8vcl if you have send mail on this group that you wanted me to read please = repost, i had my redirection setup incorrectly. greets, Bart van der Werf |
From: Robert M. <mar...@us...> - 2007-03-15 12:10:01
|
Update of /cvsroot/utf8vcl/utf8vcl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11371 Modified Files: MissingMethods-incomplete.txt TestForm.dfm TestForm.pas UTF8VCL.pas Log Message: hooking refactored, some functions intercepted Index: TestForm.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.pas,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TestForm.pas 14 Mar 2007 11:29:02 -0000 1.14 --- TestForm.pas 15 Mar 2007 12:09:49 -0000 1.15 *************** *** 34,39 **** --- 34,41 ---- Activate: TButton; Deactivate: TButton; + Button4: TButton; procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); + procedure Button4Click(Sender: TObject); public end; *************** *** 146,149 **** --- 148,152 ---- ShowMessageFmt('Strange text: %s', [TestText]); + OutputDebugString(PChar(TestText)); Content := Menu1.Caption; *************** *** 230,233 **** --- 233,241 ---- end; + procedure TForm1.Button4Click(Sender: TObject); + begin + FatalAppExit(0, TestText); + end; + end. Index: UTF8VCL.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCL.pas,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** UTF8VCL.pas 13 Mar 2007 12:36:52 -0000 1.13 --- UTF8VCL.pas 15 Mar 2007 12:09:49 -0000 1.14 *************** *** 19,26 **** --- 19,28 ---- UTF8VCLUtils, UTF8VCLMessages; + { function _CreateWindowExA(dwExStyle: DWORD; lpClassName: PAnsiChar; lpWindowName: PAnsiChar; dwStyle: DWORD; X, Y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU; hInstance: HINST; lpParam: Pointer): HWND; stdcall; external user32 name 'CreateWindowExA'; + } function _CreateWindowExW(dwExStyle: DWORD; lpClassName: PWideChar; lpWindowName: PWideChar; dwStyle: DWORD; X, Y, nWidth, nHeight: Integer; *************** *** 64,70 **** TempWParam, TempLParam: Longint; begin ! MessageU2WBefore(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Pointer(@SendMessageW)); ! Result := SendMessageW(hWnd, Msg, TempWParam, TempLParam); ! Result := MessageU2WAfter(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Result, Pointer(@SendMessageW)); end; --- 66,77 ---- TempWParam, TempLParam: Longint; begin ! if LongWord(GetWindowLong(hWnd, GWL_HINSTANCE)) = HInstance then ! begin ! MessageU2WBefore(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Pointer(@SendMessageW)); ! Result := SendMessageW(hWnd, Msg, TempWParam, TempLParam); ! Result := MessageU2WAfter(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Result, Pointer(@SendMessageW)); ! end ! else ! Result := SendMessageA(hWnd, Msg, WParam, LParam); end; *************** *** 73,79 **** TempWParam, TempLParam: Longint; begin ! MessageU2WBefore(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Pointer(@PostMessageW)); ! Result := PostMessageW(hWnd, Msg, TempWParam, TempLParam); ! MessageU2WAfter(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, 0, Pointer(@PostMessageW)); end; --- 80,91 ---- TempWParam, TempLParam: Longint; begin ! if LongWord(GetWindowLong(hWnd, GWL_HINSTANCE)) = HInstance then ! begin ! MessageU2WBefore(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, Pointer(@PostMessageW)); ! Result := PostMessageW(hWnd, Msg, TempWParam, TempLParam); ! MessageU2WAfter(hWnd, Msg, WParam, LParam, TempWParam, TempLParam, 0, Pointer(@PostMessageW)); ! end ! else ! Result := PostMessageA(hWnd, Msg, WParam, LParam); end; *************** *** 430,443 **** end; var LibUser32: HMODULE = 0; LibGdi32: HMODULE = 0; ! function HookUser32Func(const FunctionName: PChar; NewFunc: Pointer): Pointer; begin ! if LibUser32 = 0 then ! LibUser32 := GetModuleHandle(user32); ! Result := GetProcAddress(LibUser32, FunctionName); ! Assert(Result <> nil, Format('Function "%s" not found in user32.dll', [FunctionName])); // must not be localized ReplaceImport(Pointer(HInstance), Result, NewFunc); --- 442,482 ---- end; + procedure OutputDebugStringAIntercept(lpOutputString: PAnsiChar); stdcall; + var + OutputString: PWideChar; + begin + OutputString := nil; + try + OutputString := ConvertFromUTF8(lpOutputString); + OutputDebugStringW(OutputString); + finally + FreeMem(OutputString); + end; + end; + + procedure FatalAppExitAIntercept(uAction: UINT; lpMessageText: PAnsiChar); stdcall; + var + MessageText: PWideChar; + begin + MessageText := nil; + try + MessageText := ConvertFromUTF8(lpMessageText); + FatalAppExitW(uAction, MessageText); + finally + FreeMem(MessageText); + end; + end; + var LibUser32: HMODULE = 0; LibGdi32: HMODULE = 0; + LibKernel32: HMODULE = 0; ! function HookFunc(const FunctionName: PChar; NewFunc: Pointer; var Module: HMODULE; const ModuleName: PChar): Pointer; begin ! if Module = 0 then ! Module := GetModuleHandle(ModuleName); ! Result := GetProcAddress(Module, FunctionName); ! Assert(Result <> nil, Format('Function "%s" not found in %s', [FunctionName, ModuleName])); // must not be localized ReplaceImport(Pointer(HInstance), Result, NewFunc); *************** *** 445,457 **** end; function HookGdi32Func(const FunctionName: PChar; NewFunc: Pointer): Pointer; begin ! if LibGdi32 = 0 then ! LibGdi32 := GetModuleHandle(gdi32); ! Result := GetProcAddress(LibGdi32, FunctionName); ! Assert(Result <> nil, Format('Function "%s" not found in gdi32.dll', [FunctionName])); // must not be localized ! ReplaceImport(Pointer(HInstance), Result, NewFunc); ! //InjectJumpHook(Result, NewFunc); // no call to "Result" possible end; --- 484,500 ---- end; + function HookUser32Func(const FunctionName: PChar; NewFunc: Pointer): Pointer; + begin + Result := HookFunc(FunctionName, NewFunc, LibUser32, user32); + end; + function HookGdi32Func(const FunctionName: PChar; NewFunc: Pointer): Pointer; begin ! Result := HookFunc(FunctionName, NewFunc, LibGdi32, gdi32); ! end; ! function HookKernel32Func(const FunctionName: PChar; NewFunc: Pointer): Pointer; ! begin ! Result := HookFunc(FunctionName, NewFunc, LibKernel32, kernel32); end; *************** *** 473,480 **** HookUser32Func('DrawTextA', @DrawTextAIntercept); // do not localize HookUser32Func('DrawTextExA', @DrawTextExAIntercept); // do not localize - HookGdi32Func('TextOutA', @TextOutAIntercept); // do not localize - HookGdi32Func('ExtTextOutA', @ExtTextOutAIntercept); // do not localize - HookGdi32Func('GetTextExtentPoint32A', @GetTextExtentPoint32AIntercept); // do not localize - HookGdi32Func('GetTextExtentExPointA', @GetTextExtentExPointAIntercept); // do not localize HookUser32Func('SetWindowLongA', @SetWindowLongAIntercept); // do not localize HookUser32Func('SetWindowTextA', @SetWindowTextAIntercept); // do not localize --- 516,519 ---- *************** *** 489,492 **** --- 528,539 ---- HookUser32Func('InsertMenuItemA', @InsertMenuItemAIntercept); // do not localize HookUser32Func('MessageBoxA', @MessageBoxAIntercept); // do not localize + + HookGdi32Func('TextOutA', @TextOutAIntercept); // do not localize + HookGdi32Func('ExtTextOutA', @ExtTextOutAIntercept); // do not localize + HookGdi32Func('GetTextExtentPoint32A', @GetTextExtentPoint32AIntercept); // do not localize + HookGdi32Func('GetTextExtentExPointA', @GetTextExtentExPointAIntercept); // do not localize + + HookKernel32Func('OutputDebugStringA', @OutputDebugStringAIntercept); // do not localize + HookKernel32Func('FatalAppExitA', @FatalAppExitAIntercept); // do not localize end else Index: TestForm.dfm =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.dfm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TestForm.dfm 14 Mar 2007 11:29:02 -0000 1.9 --- TestForm.dfm 15 Mar 2007 12:09:49 -0000 1.10 *************** *** 176,179 **** --- 176,188 ---- TabOrder = 14 end + object Button4: TButton + Left = 385 + Top = 398 + Width = 70 + Height = 24 + Caption = 'FatalAppExit' + TabOrder = 15 + OnClick = Button4Click + end object MainMenu1: TMainMenu Left = 104 Index: MissingMethods-incomplete.txt =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/MissingMethods-incomplete.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MissingMethods-incomplete.txt 12 Mar 2007 06:27:49 -0000 1.4 --- MissingMethods-incomplete.txt 15 Mar 2007 12:09:49 -0000 1.5 *************** *** 67,73 **** Candidates found by checking Windows.pas (rom): - FatalAppExitA - GetStartupInfoA - OutputDebugStringA SendMessageTimeoutA PostThreadMessageA --- 67,70 ---- |
From: Robert M. <mar...@us...> - 2007-03-14 11:29:08
|
Update of /cvsroot/utf8vcl/utf8vcl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13970 Modified Files: TestForm.dfm TestForm.pas UTF8Test.cfg Log Message: no codepage 65001 set anymore Index: TestForm.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.pas,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** TestForm.pas 13 Mar 2007 12:36:52 -0000 1.13 --- TestForm.pas 14 Mar 2007 11:29:02 -0000 1.14 *************** *** 30,34 **** Button3: TButton; RichEdit1: TRichEdit; - Label2: TLabel; StringGrid1: TStringGrid; ListView1: TListView; --- 30,33 ---- Index: TestForm.dfm =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.dfm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TestForm.dfm 13 Mar 2007 12:36:51 -0000 1.8 --- TestForm.dfm 14 Mar 2007 11:29:02 -0000 1.9 *************** *** 25,47 **** Caption = 'Label1' end - object Label2: TLabel - Left = 8 - Top = 304 - Width = 625 - Height = 120 - Caption = - 'Press button '#39'Translate'#39'. If you do not see the text "Internatio' + - 'nalization" using strange letters, make sure you told Delphi tha' + - 't the codepage is 65001 (UTF8). If you get an error when compili' + - 'ng, you may need to remove the three strange characters at the s' + - 'tart of TestForm.pas' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -21 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - WordWrap = True - end object Edit1: TEdit Left = 8 --- 25,28 ---- *************** *** 118,122 **** object Button2: TButton Left = 567 ! Top = 263 Width = 71 Height = 24 --- 99,103 ---- object Button2: TButton Left = 567 ! Top = 399 Width = 71 Height = 24 *************** *** 127,131 **** object Button3: TButton Left = 473 ! Top = 262 Width = 70 Height = 24 --- 108,112 ---- object Button3: TButton Left = 473 ! Top = 398 Width = 70 Height = 24 *************** *** 179,183 **** object Activate: TButton Left = 8 ! Top = 272 Width = 137 Height = 25 --- 160,164 ---- object Activate: TButton Left = 8 ! Top = 400 Width = 137 Height = 25 *************** *** 188,192 **** object Deactivate: TButton Left = 152 ! Top = 272 Width = 137 Height = 25 --- 169,173 ---- object Deactivate: TButton Left = 152 ! Top = 400 Width = 137 Height = 25 Index: UTF8Test.cfg =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8Test.cfg,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** UTF8Test.cfg 10 Mar 2007 10:14:39 -0000 1.6 --- UTF8Test.cfg 14 Mar 2007 11:29:02 -0000 1.7 *************** *** 38,40 **** -w-UNSAFE_CODE -w-UNSAFE_CAST - --codepage:65001 --- 38,39 ---- |
From: Robert M. <mar...@us...> - 2007-03-14 10:18:12
|
Update of /cvsroot/utf8vcl/utf8vcl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5893 Modified Files: MissingWindowMessages-incomplete.txt Log Message: removed some entries which need no patch Index: MissingWindowMessages-incomplete.txt =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/MissingWindowMessages-incomplete.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MissingWindowMessages-incomplete.txt 7 Mar 2007 19:28:19 -0000 1.2 --- MissingWindowMessages-incomplete.txt 14 Mar 2007 10:18:09 -0000 1.3 *************** *** 1,3 **** - LB_GETCOUNT LB_SELECTSTRING EN_MAXTEXT --- 1,2 ---- *************** *** 7,16 **** LB_ADDSTRING LB_INSERTSTRING - LB_DELETESTRING LB_SELECTSTRING LB_FINDSTRING LB_FINDSTRINGEXACT CB_ADDSTRING - CB_DELETESTRING CB_INSERTSTRING CB_FINDSTRING --- 6,13 ---- |
From: Bart v. d. W. <blu...@us...> - 2007-03-13 21:30:52
|
Update of /cvsroot/utf8vcl/utf8vcl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22037 Added Files: UTF8VCLCommCtrl.pas Log Message: Add stub for CommCtrl intercept stuff Seems like a big one to convert. --- NEW FILE: UTF8VCLCommCtrl.pas --- function CreatePropertySheetPage; external cctrl name 'CreatePropertySheetPageA'; function CreatePropertySheetPageA; external cctrl name 'CreatePropertySheetPageA'; function CreatePropertySheetPageW; external cctrl name 'CreatePropertySheetPageW'; function DestroyPropertySheetPage; external cctrl name 'DestroyPropertySheetPage'; function PropertySheet; external cctrl name 'PropertySheetA'; function PropertySheetA; external cctrl name 'PropertySheetA'; function PropertySheetW; external cctrl name 'PropertySheetW'; function ImageList_LoadImage; external cctrl name 'ImageList_LoadImageA'; function ImageList_LoadImageA; external cctrl name 'ImageList_LoadImageA'; function ImageList_LoadImageW; external cctrl name 'ImageList_LoadImageW'; procedure DrawStatusText; external cctrl name 'DrawStatusTextA'; procedure DrawStatusTextA; external cctrl name 'DrawStatusTextA'; procedure DrawStatusTextW; external cctrl name 'DrawStatusTextW'; function CreateStatusWindow; external cctrl name 'CreateStatusWindowA'; function CreateStatusWindowA; external cctrl name 'CreateStatusWindowA'; function CreateStatusWindowW; external cctrl name 'CreateStatusWindowW'; delphi seems to use the callback method to provide windows with the text LVM_SETUNICODEFORMAT LVM_GETITEM LVM_SETITEM LVM_INSERTITEM LVM_FINDITEM LVM_GETSTRINGWIDTH LVM_HITTEST? LVM_GETCOLUMN LVM_SETCOLUMN LVM_INSERTCOLUMN LVM_GETITEMTEXT LVM_SETITEMTEXT LVM_SORTITEMS LVM_GETISEARCHSTRING and the callback of LVN_GETDISPINFO LVN_ODFINDITEM and alot more of the HDM_* and TVM_* |
From: Robert M. <mar...@us...> - 2007-03-13 12:36:58
|
Update of /cvsroot/utf8vcl/utf8vcl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22889 Modified Files: TestForm.dfm TestForm.pas UTF8VCL.pas Log Message: added TListView which has painting problems centralized hooking in procedure for in-program hooking (does not work yet, throws assertions) Index: TestForm.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.pas,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TestForm.pas 12 Mar 2007 19:31:15 -0000 1.12 --- TestForm.pas 13 Mar 2007 12:36:52 -0000 1.13 *************** *** 32,35 **** --- 32,38 ---- Label2: TLabel; StringGrid1: TStringGrid; + ListView1: TListView; + Activate: TButton; + Deactivate: TButton; procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); *************** *** 42,45 **** --- 45,51 ---- implementation + uses + UTF8VCL; + {$R *.dfm} *************** *** 50,192 **** procedure TForm1.Button2Click(Sender: TObject); var ! x, y: Integer; begin Menu1.Caption := TestText; menuItem1.Caption := TestText; Label1.Caption := TestText; Edit1.Text := TestText; Memo1.Text := TestText; Button1.Caption := TestText; CheckBox1.Caption := TestText; RadioButton1.Caption := TestText; ListBox1.Items.Clear; ListBox1.Items.Add(TestText); ComboBox1.Items.Clear; ComboBox1.Items.Add(TestText); ComboBox1.Text := TestText; GroupBox1.Caption := TestText; Button2.Caption := TestText; RichEdit1.Text := TestText; Application.Title := TestText; Self.Caption := TestText; Self.Text := TestText; ! for y := 0 to StringGrid1.RowCount -1 do ! for x := 0 to StringGrid1.ColCount -1 do ! StringGrid1.Rows[y][x] := TestText; end; procedure TForm1.Button3Click(Sender: TObject); var ! x, y: Integer; ! a: string; begin ! a := Menu1.Caption; ! a := menuItem1.Caption; ! a := Label1.Caption; ! a := Edit1.Text; ! a := Memo1.Text; ! a := Button1.Caption; ! a := CheckBox1.Caption; ! a := RadioButton1.Caption; if ListBox1.Items.Count > 0 then ! a := ListBox1.Items[0]; if ComboBox1.Items.Count > 0 then ! a := ComboBox1.Items[0]; ! a := ComboBox1.Text; ! a := GroupBox1.Caption; ! a := Button2.Caption; ! a := RichEdit1.Text; ! a := Application.Title; // truncated (like ComboBox1.Text) ! a := Self.Caption; ! a := Self.Text; ! for y := 0 to StringGrid1.RowCount -1 do ! for x := 0 to StringGrid1.ColCount -1 do ! a := StringGrid1.Rows[y][x]; ! ShowMessage(TestText); ! a := Menu1.Caption; ! Menu1.Caption := a; ! Assert(Menu1.Caption = a); ! a := menuItem1.Caption; ! menuItem1.Caption := a; ! Assert(menuItem1.Caption = a); ! a := Label1.Caption; ! Label1.Caption := a; ! Assert(Label1.Caption = a); ! a := Edit1.Text; ! Edit1.Text := a; ! Assert(Edit1.Text = a); ! a := Memo1.Text; ! Memo1.Text := a; ! Assert(Memo1.Text = a); ! a := Button1.Caption; ! Button1.Caption := a; ! Assert(Button1.Caption = a); ! a := CheckBox1.Caption; ! CheckBox1.Caption := a; ! Assert(CheckBox1.Caption = a); ! a := RadioButton1.Caption; ! RadioButton1.Caption := a; ! Assert(RadioButton1.Caption = a); if ListBox1.Items.Count > 0 then begin ! a := ListBox1.Items[0]; ! ListBox1.Items[0] := a; ! Assert(ListBox1.Items[0] = a); end; if ComboBox1.Items.Count > 0 then begin ! a := ComboBox1.Items[0]; ! ComboBox1.Items[0] := a; ! Assert(ComboBox1.Items[0] = a); end; ! a := ComboBox1.Text; ! ComboBox1.Text := a; ! Assert(ComboBox1.Text = a); ! a := GroupBox1.Caption; ! GroupBox1.Caption := a; ! Assert(GroupBox1.Caption = a); ! a := Button2.Caption; ! Button2.Caption := a; ! Assert(Button2.Caption = a); ! a := RichEdit1.Text; ! RichEdit1.Text := a; ! Assert(RichEdit1.Text = a); ! a := Application.Title; ! Application.Title := a; ! Assert(Application.Title = a); ! a := Self.Caption; ! Self.Caption := a; ! Assert(Self.Caption = a); ! a := Self.Text; ! Self.Text := a; ! Assert(Self.Text = a); ! for y := 0 to StringGrid1.RowCount -1 do ! for x := 0 to StringGrid1.ColCount -1 do begin ! a := StringGrid1.Rows[y][x]; ! StringGrid1.Rows[y][x] := a; ! Assert(StringGrid1.Rows[y][x] = a); end; - end; --- 56,232 ---- procedure TForm1.Button2Click(Sender: TObject); var ! X, Y: Integer; ! ! procedure CheckTranslation(ComponentName, Content: string; Test: string = TestText); ! begin ! if Content <> Test then ! ShowMessageFmt('Component "%s" does not work yet "%s" vs. "%s"', [ComponentName, Test, Content]); ! end; ! begin Menu1.Caption := TestText; + CheckTranslation(Menu1.Name, Menu1.Caption, '&' + TestText); menuItem1.Caption := TestText; + CheckTranslation(menuItem1.Name, menuItem1.Caption); Label1.Caption := TestText; + CheckTranslation(Label1.Name, Label1.Caption); Edit1.Text := TestText; + CheckTranslation(Edit1.Name, Edit1.Text); Memo1.Text := TestText; + CheckTranslation(Memo1.Name, Memo1.Text); Button1.Caption := TestText; + CheckTranslation(Button1.Name, Button1.Caption); CheckBox1.Caption := TestText; + CheckTranslation(CheckBox1.Name, CheckBox1.Caption); RadioButton1.Caption := TestText; + CheckTranslation(RadioButton1.Name, RadioButton1.Caption); ListBox1.Items.Clear; ListBox1.Items.Add(TestText); + CheckTranslation(ListBox1.Name, ListBox1.Items[0]); ComboBox1.Items.Clear; ComboBox1.Items.Add(TestText); + CheckTranslation(ComboBox1.Name, ComboBox1.Items[0]); ComboBox1.Text := TestText; + CheckTranslation(ComboBox1.Name, ComboBox1.Text); GroupBox1.Caption := TestText; + CheckTranslation(GroupBox1.Name, GroupBox1.Caption); Button2.Caption := TestText; + CheckTranslation(Button2.Name, Button2.Caption); RichEdit1.Text := TestText; + CheckTranslation(RichEdit1.Name, RichEdit1.Text); Application.Title := TestText; + CheckTranslation(Application.Name, Application.Title); Self.Caption := TestText; + CheckTranslation(Self.Name, Self.Caption); Self.Text := TestText; ! CheckTranslation(Self.Name, Self.Text); ! for Y := 0 to StringGrid1.RowCount -1 do ! for X := 0 to StringGrid1.ColCount -1 do ! begin ! StringGrid1.Rows[Y][X] := TestText; ! CheckTranslation(StringGrid1.Name, StringGrid1.Rows[Y][X]); ! end; ! ListView1.Columns[0].Caption := TestText; ! CheckTranslation(ListView1.Name, ListView1.Columns[0].Caption); ! ListView1.Columns[1].Caption := TestText; ! ListView1.Items[0].Caption := TestText; ! CheckTranslation(ListView1.Name, ListView1.Items[0].Caption); ! ListView1.Items[1].Caption := TestText; ! ListView1.Items[0].SubItems[0] := TestText; ! ListView1.Items[1].SubItems[0] := TestText; end; procedure TForm1.Button3Click(Sender: TObject); var ! X, Y: Integer; ! Content: string; begin ! Content := Menu1.Caption; ! Content := menuItem1.Caption; ! Content := Label1.Caption; ! Content := Edit1.Text; ! Content := Memo1.Text; ! Content := Button1.Caption; ! Content := CheckBox1.Caption; ! Content := RadioButton1.Caption; if ListBox1.Items.Count > 0 then ! Content := ListBox1.Items[0]; if ComboBox1.Items.Count > 0 then ! Content := ComboBox1.Items[0]; ! Content := ComboBox1.Text; ! Content := GroupBox1.Caption; ! Content := Button2.Caption; ! Content := RichEdit1.Text; ! Content := Application.Title; ! Content := Self.Caption; ! Content := Self.Text; ! for Y := 0 to StringGrid1.RowCount -1 do ! for X := 0 to StringGrid1.ColCount -1 do ! Content := StringGrid1.Rows[Y][X]; ! ShowMessageFmt('Strange text: %s', [TestText]); ! Content := Menu1.Caption; ! Menu1.Caption := Content; ! Assert(Menu1.Caption = Content); ! Content := menuItem1.Caption; ! menuItem1.Caption := Content; ! Assert(menuItem1.Caption = Content); ! Content := Label1.Caption; ! Label1.Caption := Content; ! Assert(Label1.Caption = Content); ! Content := Edit1.Text; ! Edit1.Text := Content; ! Assert(Edit1.Text = Content); ! Content := Memo1.Text; ! Memo1.Text := Content; ! Assert(Memo1.Text = Content); ! Content := Button1.Caption; ! Button1.Caption := Content; ! Assert(Button1.Caption = Content); ! Content := CheckBox1.Caption; ! CheckBox1.Caption := Content; ! Assert(CheckBox1.Caption = Content); ! Content := RadioButton1.Caption; ! RadioButton1.Caption := Content; ! Assert(RadioButton1.Caption = Content); if ListBox1.Items.Count > 0 then begin ! Content := ListBox1.Items[0]; ! ListBox1.Items[0] := Content; ! Assert(ListBox1.Items[0] = Content); end; if ComboBox1.Items.Count > 0 then begin ! Content := ComboBox1.Items[0]; ! ComboBox1.Items[0] := Content; ! Assert(ComboBox1.Items[0] = Content); end; ! Content := ComboBox1.Text; ! ComboBox1.Text := Content; ! Assert(ComboBox1.Text = Content); ! Content := GroupBox1.Caption; ! GroupBox1.Caption := Content; ! Assert(GroupBox1.Caption = Content); ! Content := Button2.Caption; ! Button2.Caption := Content; ! Assert(Button2.Caption = Content); ! Content := RichEdit1.Text; ! RichEdit1.Text := Content; ! Assert(RichEdit1.Text = Content); ! Content := Application.Title; ! Application.Title := Content; ! Assert(Application.Title = Content); ! Content := Self.Caption; ! Self.Caption := Content; ! Assert(Self.Caption = Content); ! Content := Self.Text; ! Self.Text := Content; ! Assert(Self.Text = Content); ! for Y := 0 to StringGrid1.RowCount -1 do ! for X := 0 to StringGrid1.ColCount -1 do begin ! Content := StringGrid1.Rows[Y][X]; ! StringGrid1.Rows[Y][X] := Content; ! Assert(StringGrid1.Rows[Y][X] = Content); end; end; Index: UTF8VCL.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCL.pas,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** UTF8VCL.pas 12 Mar 2007 19:31:16 -0000 1.12 --- UTF8VCL.pas 13 Mar 2007 12:36:52 -0000 1.13 *************** *** 11,14 **** --- 11,16 ---- interface + procedure ActivateUtf8VCL(Active: Boolean); + implementation *************** *** 454,482 **** end; initialization ! HookUser32Func('SendMessageA', @SendMessageAIntercept); // do not localize ! HookUser32Func('PostMessageA', @PostMessageAIntercept); // do not localize ! HookUser32Func('CreateWindowExA', @CreateWindowExAIntercept); // do not localize ! HookUser32Func('UnregisterClassA', @UnregisterClassAIntercept); // do not localize ! HookUser32Func('RegisterClassA', @RegisterClassAIntercept); // do not localize ! HookUser32Func('RegisterClassExA', @RegisterClassExAIntercept); // do not localize ! HookUser32Func('DrawTextA', @DrawTextAIntercept); // do not localize ! HookUser32Func('DrawTextExA', @DrawTextExAIntercept); // do not localize ! HookGdi32Func('TextOutA', @TextOutAIntercept); // do not localize ! HookGdi32Func('ExtTextOutA', @ExtTextOutAIntercept); // do not localize ! HookGdi32Func('GetTextExtentPoint32A', @GetTextExtentPoint32AIntercept); // do not localize ! HookGdi32Func('GetTextExtentExPointA', @GetTextExtentExPointAIntercept); // do not localize ! HookUser32Func('SetWindowLongA', @SetWindowLongAIntercept); // do not localize ! HookUser32Func('SetWindowTextA', @SetWindowTextAIntercept); // do not localize ! HookUser32Func('GetClassInfoA', @GetClassInfoAIntercept); // do not localize ! HookUser32Func('GetClassInfoExA', @GetClassInfoExAIntercept); // do not localize ! HookUser32Func('CallWindowProcA', @CallWindowProcAIntercept); // do not localize ! HookUser32Func('IsWindowUnicode', @IsWindowUnicodeIntercept); // do not localize ! HookUser32Func('GetWindowLongA', @GetWindowLongAIntercept); // do not localize ! HookUser32Func('DefWindowProcA', @DefWindowProcAIntercept); // do not localize ! HookUser32Func('GetWindowTextA', @GetWindowTextAIntercept); // do not localize ! HookUser32Func('InsertMenuA', @InsertMenuAIntercept); // do not localize ! HookUser32Func('InsertMenuItemA', @InsertMenuItemAIntercept); // do not localize ! HookUser32Func('MessageBoxA', @MessageBoxAIntercept); // do not localize end. --- 456,501 ---- end; + var + ActiveState: Boolean = False; + + procedure ActivateUtf8VCL(Active: Boolean); + begin + if Active = ActiveState then + Exit; + if Active then + begin + HookUser32Func('SendMessageA', @SendMessageAIntercept); // do not localize + HookUser32Func('PostMessageA', @PostMessageAIntercept); // do not localize + HookUser32Func('CreateWindowExA', @CreateWindowExAIntercept); // do not localize + HookUser32Func('UnregisterClassA', @UnregisterClassAIntercept); // do not localize + HookUser32Func('RegisterClassA', @RegisterClassAIntercept); // do not localize + HookUser32Func('RegisterClassExA', @RegisterClassExAIntercept); // do not localize + HookUser32Func('DrawTextA', @DrawTextAIntercept); // do not localize + HookUser32Func('DrawTextExA', @DrawTextExAIntercept); // do not localize + HookGdi32Func('TextOutA', @TextOutAIntercept); // do not localize + HookGdi32Func('ExtTextOutA', @ExtTextOutAIntercept); // do not localize + HookGdi32Func('GetTextExtentPoint32A', @GetTextExtentPoint32AIntercept); // do not localize + HookGdi32Func('GetTextExtentExPointA', @GetTextExtentExPointAIntercept); // do not localize + HookUser32Func('SetWindowLongA', @SetWindowLongAIntercept); // do not localize + HookUser32Func('SetWindowTextA', @SetWindowTextAIntercept); // do not localize + HookUser32Func('GetClassInfoA', @GetClassInfoAIntercept); // do not localize + HookUser32Func('GetClassInfoExA', @GetClassInfoExAIntercept); // do not localize + HookUser32Func('CallWindowProcA', @CallWindowProcAIntercept); // do not localize + HookUser32Func('IsWindowUnicode', @IsWindowUnicodeIntercept); // do not localize + HookUser32Func('GetWindowLongA', @GetWindowLongAIntercept); // do not localize + HookUser32Func('DefWindowProcA', @DefWindowProcAIntercept); // do not localize + HookUser32Func('GetWindowTextA', @GetWindowTextAIntercept); // do not localize + HookUser32Func('InsertMenuA', @InsertMenuAIntercept); // do not localize + HookUser32Func('InsertMenuItemA', @InsertMenuItemAIntercept); // do not localize + HookUser32Func('MessageBoxA', @MessageBoxAIntercept); // do not localize + end + else + begin + // TODO unhooking + end; + end; + initialization ! ActivateUtf8VCL(True); end. Index: TestForm.dfm =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.dfm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestForm.dfm 12 Mar 2007 19:31:09 -0000 1.7 --- TestForm.dfm 13 Mar 2007 12:36:51 -0000 1.8 *************** *** 1,8 **** object Form1: TForm1 ! Left = 603 ! Top = 264 ! Width = 665 ! Height = 489 Caption = 'Form1' Color = clBtnFace Font.Charset = ANSI_CHARSET --- 1,10 ---- object Form1: TForm1 ! Left = 234 ! Top = 127 ! BorderIcons = [biSystemMenu, biMinimize] ! BorderStyle = bsSingle Caption = 'Form1' + ClientHeight = 435 + ClientWidth = 657 Color = clBtnFace Font.Charset = ANSI_CHARSET *************** *** 13,30 **** Menu = MainMenu1 OldCreateOrder = False PixelsPerInch = 96 ! TextHeight = 14 object Label1: TLabel ! Left = 7 ! Top = 7 Width = 32 ! Height = 14 Caption = 'Label1' end object Label2: TLabel ! Left = 7 ! Top = 224 ! Width = 343 ! Height = 184 Caption = 'Press button '#39'Translate'#39'. If you do not see the text "Internatio' + --- 15,33 ---- Menu = MainMenu1 OldCreateOrder = False + Position = poScreenCenter PixelsPerInch = 96 ! TextHeight = 15 object Label1: TLabel ! Left = 8 ! Top = 8 Width = 32 ! Height = 15 Caption = 'Label1' end object Label2: TLabel ! Left = 8 ! Top = 304 ! Width = 625 ! Height = 120 Caption = 'Press button '#39'Translate'#39'. If you do not see the text "Internatio' + *************** *** 35,39 **** Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText ! Font.Height = -20 Font.Name = 'Arial' Font.Style = [] --- 38,42 ---- Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText ! Font.Height = -21 Font.Name = 'Arial' Font.Style = [] *************** *** 42,57 **** end object Edit1: TEdit ! Left = 7 ! Top = 28 ! Width = 196 ! Height = 22 TabOrder = 0 Text = 'Edit1' end object Memo1: TMemo ! Left = 7 ! Top = 56 ! Width = 196 ! Height = 42 Ctl3D = True Lines.Strings = ( --- 45,60 ---- end object Edit1: TEdit ! Left = 8 ! Top = 30 ! Width = 210 ! Height = 23 TabOrder = 0 Text = 'Edit1' end object Memo1: TMemo ! Left = 8 ! Top = 60 ! Width = 210 ! Height = 45 Ctl3D = True Lines.Strings = ( *************** *** 61,93 **** end object Button1: TButton ! Left = 7 ! Top = 105 ! Width = 65 ! Height = 21 Caption = 'Button1' TabOrder = 2 end object CheckBox1: TCheckBox ! Left = 77 ! Top = 105 ! Width = 126 ! Height = 14 Caption = 'CheckBox1' TabOrder = 3 end object RadioButton1: TRadioButton ! Left = 209 ! Top = 153 ! Width = 162 ! Height = 15 Caption = 'RadioButton1' TabOrder = 4 end object ListBox1: TListBox ! Left = 7 ! Top = 133 ! Width = 196 ! Height = 42 ! ItemHeight = 14 Items.Strings = ( 'ListBox1') --- 64,96 ---- end object Button1: TButton ! Left = 8 ! Top = 113 ! Width = 69 ! Height = 22 Caption = 'Button1' TabOrder = 2 end object CheckBox1: TCheckBox ! Left = 83 ! Top = 113 ! Width = 135 ! Height = 15 Caption = 'CheckBox1' TabOrder = 3 end object RadioButton1: TRadioButton ! Left = 224 ! Top = 172 ! Width = 174 ! Height = 16 Caption = 'RadioButton1' TabOrder = 4 end object ListBox1: TListBox ! Left = 8 ! Top = 143 ! Width = 210 ! Height = 45 ! ItemHeight = 15 Items.Strings = ( 'ListBox1') *************** *** 95,103 **** end object ComboBox1: TComboBox ! Left = 209 ! Top = 133 ! Width = 162 ! Height = 22 ! ItemHeight = 14 TabOrder = 6 Text = 'ComboBox1' --- 98,106 ---- end object ComboBox1: TComboBox ! Left = 224 ! Top = 143 ! Width = 174 ! Height = 23 ! ItemHeight = 15 TabOrder = 6 Text = 'ComboBox1' *************** *** 106,121 **** end object GroupBox1: TGroupBox ! Left = 209 ! Top = 84 ! Width = 162 ! Height = 42 Caption = 'GroupBox1' TabOrder = 7 end object Button2: TButton ! Left = 305 ! Top = 186 ! Width = 66 ! Height = 22 Caption = 'Translate' TabOrder = 8 --- 109,124 ---- end object GroupBox1: TGroupBox ! Left = 224 ! Top = 90 ! Width = 174 ! Height = 45 Caption = 'GroupBox1' TabOrder = 7 end object Button2: TButton ! Left = 567 ! Top = 263 ! Width = 71 ! Height = 24 Caption = 'Translate' TabOrder = 8 *************** *** 123,130 **** end object Button3: TButton ! Left = 8 ! Top = 185 ! Width = 66 ! Height = 22 Caption = 'SomeTests' TabOrder = 9 --- 126,133 ---- end object Button3: TButton ! Left = 473 ! Top = 262 ! Width = 70 ! Height = 24 Caption = 'SomeTests' TabOrder = 9 *************** *** 132,139 **** end object RichEdit1: TRichEdit ! Left = 209 Top = 0 ! Width = 162 ! Height = 77 Lines.Strings = ( 'RichEdit1') --- 135,142 ---- end object RichEdit1: TRichEdit ! Left = 224 Top = 0 ! Width = 174 ! Height = 83 Lines.Strings = ( 'RichEdit1') *************** *** 141,151 **** end object StringGrid1: TStringGrid ! Left = 376 Top = 0 ! Width = 217 ! Height = 120 ColCount = 3 RowCount = 4 TabOrder = 11 end object MainMenu1: TMainMenu --- 144,197 ---- end object StringGrid1: TStringGrid ! Left = 403 Top = 0 ! Width = 232 ! Height = 129 ColCount = 3 RowCount = 4 + Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing] TabOrder = 11 + ColWidths = ( + 64 + 99 + 80) + end + object ListView1: TListView + Left = 400 + Top = 136 + Width = 241 + Height = 113 + Columns = < + item + Caption = 'Column1' + end + item + Caption = 'Column2' + end> + GridLines = True + Items.Data = { + 540000000200000000000000FFFFFFFFFFFFFFFF010000000000000005497465 + 6D3109537562314974656D3100000000FFFFFFFFFFFFFFFF0100000000000000 + 054974656D3209537562324974656D31FFFFFFFF} + TabOrder = 12 + ViewStyle = vsReport + end + object Activate: TButton + Left = 8 + Top = 272 + Width = 137 + Height = 25 + Caption = 'Activate UTF8 support' + Enabled = False + TabOrder = 13 + end + object Deactivate: TButton + Left = 152 + Top = 272 + Width = 137 + Height = 25 + Caption = 'Deactivate UTF8 support' + Enabled = False + TabOrder = 14 end object MainMenu1: TMainMenu |