Patches from Graeme bug #20172 and bug #20173

git-svn-id: trunk@32193 -
This commit is contained in:
sekelsenmat 2011-09-06 15:34:10 +00:00
parent 4b5df285ff
commit dc933c1466
2 changed files with 23 additions and 3 deletions

View File

@ -42,6 +42,9 @@ type
private
protected
public
published
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
class procedure DestroyHandle(const AWinControl: TWinControl); override;
end;
{ TFpGuiWSSpeedButton }
@ -55,6 +58,22 @@ type
implementation
{ TFpGuiWSBitBtn }
class function TFpGuiWSBitBtn.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): TLCLIntfHandle;
begin
Result := TLCLIntfHandle(TFPGUIPrivateButton.Create(AWinControl, AParams));
end;
class procedure TFpGuiWSBitBtn.DestroyHandle(const AWinControl: TWinControl);
begin
TFPGUIPrivateButton(AWinControl.Handle).Free;
AWinControl.Handle := 0;
end;
initialization
////////////////////////////////////////////////////

View File

@ -6,7 +6,7 @@ interface
uses
Classes, Controls, StdCtrls, Forms, Menus, ExtCtrls, Dialogs, ComCtrls,
WSLCLClasses;
Buttons, WSLCLClasses;
// imglist
function RegisterCustomImageList: Boolean;
@ -374,7 +374,7 @@ end;
function RegisterCustomPanel: Boolean; alias : 'WSRegisterCustomPanel';
begin
RegisterWSComponent(TCustomPanel, TFpGuiWSCustomPanel);
Result := False;
Result := True;
end;
function RegisterCustomTrayIcon: Boolean; alias : 'WSRegisterCustomTrayIcon';
@ -427,7 +427,8 @@ end;
// Buttons
function RegisterCustomBitBtn: Boolean; alias : 'WSRegisterCustomBitBtn';
begin
Result := False;
RegisterWSComponent(TCustomBitBtn, TFpGuiWSBitBtn);
Result := True;
end;
function RegisterCustomSpeedButton: Boolean; alias : 'WSRegisterCustomSpeedButton';