mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 00:02:03 +02:00
fix dialogs owner handle, fixes focusing issue
git-svn-id: trunk@4977 -
This commit is contained in:
parent
b5a5680774
commit
8e542cff62
@ -71,7 +71,8 @@ Type
|
||||
FMessageFont: HFONT;
|
||||
|
||||
Procedure CreateComponent(Sender: TObject);
|
||||
Function RecreateWnd(Sender: TWinControl): Integer; virtual;
|
||||
Function RecreateWnd(Sender: TWinControl): Integer; virtual;
|
||||
Function GetOwnerHandle(ADialog : TCommonDialog): HWND;
|
||||
Function GetText(Sender: TComponent; Handle: HWND; var Data: String): Boolean; virtual;
|
||||
Procedure SetLabel(Sender: TObject; Data: Pointer);
|
||||
Procedure AddChild(Parent, Child: HWND);
|
||||
@ -187,6 +188,9 @@ End.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.64 2003/12/27 16:47:18 micha
|
||||
fix dialogs owner handle, fixes focusing issue
|
||||
|
||||
Revision 1.63 2003/12/19 18:18:17 micha
|
||||
fix window activation z-order
|
||||
|
||||
|
@ -163,6 +163,30 @@ Begin
|
||||
Assert(False, 'Trace:Win32Object.Init - Exit');
|
||||
End;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWin32Object.GetOwnerHandle
|
||||
Params: ADialog - dialog to get 'guiding parent' window handle for
|
||||
Returns: A window handle
|
||||
|
||||
Returns window handle to be used as 'owner handle', ie. so that the user must
|
||||
finish the dialog before continuing
|
||||
------------------------------------------------------------------------------}
|
||||
function TWin32Object.GetOwnerHandle(ADialog : TCommonDialog): HWND;
|
||||
begin
|
||||
with ADialog do
|
||||
begin
|
||||
if Owner Is TWinControl then
|
||||
Result := TWinControl(Owner).Handle
|
||||
{
|
||||
// TODO: fix Application.Handle to be the same as FAppHandle
|
||||
else if Owner Is TApplication then
|
||||
Result := TApplication(Owner).Handle
|
||||
}
|
||||
else
|
||||
Result := FAppHandle;
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWin32Object.GetText
|
||||
Params: Sender - The control to retrieve the text from
|
||||
@ -2883,6 +2907,9 @@ End;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.153 2003/12/27 16:47:18 micha
|
||||
fix dialogs owner handle, fixes focusing issue
|
||||
|
||||
Revision 1.152 2003/12/27 16:26:55 micha
|
||||
remove redundant window property "lazarus" (from martin)
|
||||
|
||||
|
@ -540,19 +540,6 @@ Begin
|
||||
Assert (False, 'Trace:[ObjectToHWND]****** Warning: handle = 0 *******');
|
||||
End;
|
||||
|
||||
function GetOwnerHandle(ADialog : TCommonDialog): HWND;
|
||||
begin
|
||||
with ADialog do
|
||||
begin
|
||||
if Owner Is TWinControl then
|
||||
Result := TWinControl(Owner).Handle
|
||||
else if Owner Is TApplication then
|
||||
Result := TApplication(Owner).Handle
|
||||
else
|
||||
Result := TWin32Object(InterfaceObject).FAppHandle;
|
||||
end;
|
||||
end;
|
||||
|
||||
(***********************************************************************
|
||||
Widget member Functions
|
||||
************************************************************************)
|
||||
@ -748,6 +735,9 @@ End;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.34 2003/12/27 16:47:18 micha
|
||||
fix dialogs owner handle, fixes focusing issue
|
||||
|
||||
Revision 1.33 2003/12/27 16:26:55 micha
|
||||
remove redundant window property "lazarus" (from martin)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user