🚨 Use the pointer-sized window call on 64-bit Windows
SetWindowLong truncates 64-bit window handles, breaking dialog parenting on Win64 builds.
This commit is contained in:
@@ -42,8 +42,12 @@ implementation
|
||||
procedure SetWindowParent(AHandle, AParent: THANDLE);
|
||||
begin
|
||||
{$IFDEF LCLWin32}
|
||||
{$IFDEF CPU64}
|
||||
SetWindowLongPtr(AHandle, GWLP_HWNDPARENT, AParent);
|
||||
{$ELSE}
|
||||
SetWindowLong(AHandle, GWL_HWNDPARENT, AParent);
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$IFDEF LCLGtk}
|
||||
gtk_window_set_transient_for(PGtkWindow(AHandle), PGtkWindow(AParent));
|
||||
{$ENDIF}
|
||||
|
||||
Reference in New Issue
Block a user