diff --git a/lcl/forms.pp b/lcl/forms.pp index 053e20f325..ac8b5f49b0 100644 --- a/lcl/forms.pp +++ b/lcl/forms.pp @@ -1415,6 +1415,7 @@ type function GetActive: boolean; function GetCurrentHelpFile: string; function GetExename: String; + function GetHandle: THandle; function GetMainFormHandle: HWND; function GetTitle: string; procedure FreeIconHandles; @@ -1429,6 +1430,7 @@ type procedure UpdateMouseControl(NewMouseControl: TControl); procedure UpdateMouseHint(CurrentControl: TControl); procedure SetCaptureExceptions(const AValue: boolean); + procedure SetHandle(const AHandle: THandle); procedure SetHint(const AValue: string); procedure SetHintColor(const AValue: TColor); procedure SetIcon(AValue: TIcon); @@ -1591,6 +1593,7 @@ type write FFindGlobalComponentEnabled; property Flags: TApplicationFlags read FFlags write SetFlags; //property HelpSystem : IHelpSystem read FHelpSystem; + property Handle: THandle read GetHandle write SetHandle; platform; property Hint: string read FHint write SetHint; property HintColor: TColor read FHintColor write SetHintColor; property HintHidePause: Integer read FHintHidePause write FHintHidePause; diff --git a/lcl/include/application.inc b/lcl/include/application.inc index aeed5cb10a..010f46ff10 100644 --- a/lcl/include/application.inc +++ b/lcl/include/application.inc @@ -251,6 +251,11 @@ Begin Result := ParamStrUTF8(0); end; +function TApplication.GetHandle: THandle; +begin + Result := WidgetSet.AppHandle; +end; + function TApplication.GetMainFormHandle: HWND; var i: Integer; @@ -550,6 +555,11 @@ begin FFlags := Flags - [AppNoExceptionMessages] + AValue*[AppNoExceptionMessages]; end; +procedure TApplication.SetHandle(const AHandle: THandle); +begin + WidgetSet.AppHandle := AHandle; +end; + procedure TApplication.SetMainFormOnTaskBar(const AValue: Boolean); begin if FMainFormOnTaskBar = AValue then exit;