diff --git a/lcl/interfaces/fpgui/fpguiwsbuttons.pp b/lcl/interfaces/fpgui/fpguiwsbuttons.pp index 5825eb0f51..897a2ddc1b 100644 --- a/lcl/interfaces/fpgui/fpguiwsbuttons.pp +++ b/lcl/interfaces/fpgui/fpguiwsbuttons.pp @@ -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 //////////////////////////////////////////////////// diff --git a/lcl/interfaces/fpgui/fpguiwsfactory.pas b/lcl/interfaces/fpgui/fpguiwsfactory.pas index 24966246e5..4b50545220 100644 --- a/lcl/interfaces/fpgui/fpguiwsfactory.pas +++ b/lcl/interfaces/fpgui/fpguiwsfactory.pas @@ -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';