delphi中VCL一些bug的补丁修复包VCLfixpack介绍

本文介绍了针对Delphi VCL的一些bug的补丁修复包VCLfixpack,由于Delphi官方已停止维护,此补丁包为开发者提供了解决控件问题的方案。文章分享了下载链接,并通过具体代码示例展示了修复过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

delphi本身就存在问题,现在又不维护了,所以有时候用到控件的时候就不知道怎么办了。

现在知道了一个delphi的补丁包,感觉不错,拿出来分享一下。

下载地址:http://download.youkuaiyun.com/detail/sushengmiyan/4637884

拿一个修复的例子来说吧:看代码

{$IF CompilerVersion < 20.0} // Delphi 6-2007
  {$DEFINE ControlResizeFix}
  { The OPTIMIZED_RESIZE_REDRAW option is experimental. It speeds up the resizing of forms
    by not redrawing each control when it is realigned but by invalidating them all after
    one align round is done. }
  {.$DEFINE OPTIMIZED_RESIZE_REDRAW}
{$IFEND}

implementation

{$IF CompilerVersion >= 18.0}
 {$DEFINE DELPHI2006_UP}
{$IFEND}
{$IF CompilerVersion >= 17.0}
 {$DEFINE DELPHI2005_UP}
{$IFEND}

uses
  Windows, Messages, SysUtils, Classes, TypInfo, ActnList, SysConst,
  {$IFDEF ObjAutoDEPFix}
  ObjAuto,
  {$ENDIF ObjAutoDEPFix}
  {$IF CompilerVersion >= 15.0}
  Themes,
  {$IFEND}
  {$IF CompilerVersion >= 20.0}
  Character,
  {$IFEND}
  {$IFDEF VCLFIXPACK_DB_SUPPORT}
  DB, DBClient, DBGrids, DBCtrls,
  {$ENDIF VCLFIXPACK_DB_SUPPORT}
  Graphics, Controls, Forms, Dialogs, StdCtrls, Grids, ComCtrls, Buttons,
  CommCtrl;

{ ---------------------------------------------------------------------------- }
{ Helper functions, shared }
type
  TOpenWinControl = class(TWinControl);
  TOpenCustomForm = class(TCustomForm);
  TOpenCommonDialog = class(TCommonDialog);
  TOpenCustomActionList = class(TCustomActionList);
  TOpenComponent = class(TComponent);
  TOpenCustomCombo = class(TCustomCombo);

  TJumpOfs = Integer;
  PPointer = ^Pointer;

type
  PXRedirCode = ^TXRedirCode;
  TXRedirCode = packed record
    Jump: Byte;
    Offset: TJumpOfs;
  end;

  PWin9xDebugThunk = ^TWin9xDebugThunk;
  TWin9xDebugThunk = packed record
    PUSH: Byte;
    Addr: Pointer;
    JMP: TXRedirCode;
  end;

  PAbsoluteIndirectJmp = ^TAbsoluteIndirectJmp;
  TAbsoluteIndirectJmp = packed record
    OpCode: Word;   //$FF25(Jmp, FF /4)
    Addr: PPointer;
  end;

{ Hooking }

function GetActualAddr(Proc: Pointer): Pointer;

  function IsWin9xDebugThunk(AAddr: Pointer): Boolean;
  begin
    Result := (AAddr <> nil) and
              (PWin9xDebugThunk(AAddr).PUSH = $68) and
              (PWin9xDebugThunk(AAddr).JMP.Jump = $E9);
  end;

begin
  if Proc <> nil then
  begin
    if (Win32Platform <> VER_PLATFORM_WIN32_NT) and IsWin9xDebugThunk(Proc) then
      Proc := PWin9xDebugThunk(Proc).Addr;
    if (PAbsoluteIndirectJmp(Proc).OpCode = $25FF) then
      Result := PAbsoluteIndirectJmp(Proc).Addr^
    else
      Result := Proc;
  end
  else
    Result := nil;
end
Changelog: ========== 2015-04-23 (5.91) - Fixed: IDEFixPack didn't take into account that DB.TFlatList uses late loading through GetCount - Fixed: fastdcc32/64/aarm in XE7 and XE8 didn't load the CompilerSpeedPack into the compiler's process 2015-04-21 (5.9) - Added: Fix for QC 71270, 76338 and 76379. "CodeInsight doesn't like the underscore." - Added: TStringList.IndexOfName optimization - Fixed: FieldAddress optimization could fail if a published field name was also used in an ancestor 2015-02-15 (5.8) - Added: Compiler cleanup code performance optimization for large packages - Added: If XE7's rlink32.dll is detected in older Delphi versions the "too many resources to handle" patch is skipped - Changed: Installer/Uninstaller doesn't require rtl.bpl/vcl.bpl in the PATH anymore - Improved: IDE Fix Pack StringLists use CompareStringOrdinal instead of CompareString 2014-09-16 (5.71) - Improved: EditorLineBreak.ttr patch not only prevents the file loading but also deletes/renames the existing file 2014-08-25 (5.7) - Added: TObject.FieldAddress optimization for DFM loading - Added: Fix for QC 111917: RLINK32: Too many resources to handle. Instead of 3626 it can now handle 65534 resource items - Added: String function replacements without STRINGCHECKS - Added: Fix for "class operator In" class completion - Added: IDEFixPackReg*.exe supports command line parameter /EXTRACT that extracts the files instead of installing them - Added: Disable creation of EditorLineEnd.ttr 解决 EditorLineEnd.ttr 占用问题
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值