🚨 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:
2026-11-15 22:06:51 +01:00
parent ee0667aff3
commit a1a40b6f61
+4
View File
@@ -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}