mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 21:59:18 +02:00
win32: don't use GWL_ID to store the control pointer because it is truncated to 32bit. Issue #39502
This commit is contained in:
parent
92be3d6975
commit
ab324f2524
@ -1848,13 +1848,15 @@ begin
|
|||||||
DebugLn('WM_MEASUREITEM for a menuitem catched but menuitem is not TmenuItem');
|
DebugLn('WM_MEASUREITEM for a menuitem catched but menuitem is not TmenuItem');
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
{ Ondrej: WinAPI combobox / listbox sends WM_MEASUREITEM to its parent during CreateHandle
|
||||||
|
the GWL_ID is 32bit only - it makes problems on 64bit windows target. See issue #39502
|
||||||
else
|
else
|
||||||
if WParam <> 0 then
|
if WParam <> 0 then
|
||||||
begin
|
begin
|
||||||
lWinControl := TWinControl(WParam);
|
lWinControl := TWinControl(WParam);
|
||||||
//if Assigned(lWinControl) then <- already tested
|
//if Assigned(lWinControl) then <- already tested
|
||||||
SetLMessageAndParams(LM_MEASUREITEM, True);
|
SetLMessageAndParams(LM_MEASUREITEM, True);
|
||||||
end;
|
end;}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -252,7 +252,8 @@ begin
|
|||||||
// Set control ID to map WinControl. This is required for messages that sent to parent
|
// Set control ID to map WinControl. This is required for messages that sent to parent
|
||||||
// to extract control from the passed ID.
|
// to extract control from the passed ID.
|
||||||
// In case of subclassing this ID will be set in WM_NCCREATE message handler
|
// In case of subclassing this ID will be set in WM_NCCREATE message handler
|
||||||
LCLIntf.SetWindowLong(Window, GWL_ID, PtrInt(AWinControl));
|
// Ondrej: the GWL_ID is 32bit only - it makes problems on 64bit windows target. See issue #39502
|
||||||
|
//LCLIntf.SetWindowLong(Window, GWL_ID, PtrInt(AWinControl));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if AWinControl.Font.IsDefault then
|
if AWinControl.Font.IsDefault then
|
||||||
|
@ -392,7 +392,8 @@ begin
|
|||||||
WindowInfo^.WinControl.Handle := Window;
|
WindowInfo^.WinControl.Handle := Window;
|
||||||
WindowInfo^.DefWndProc := NCCreateParams^.DefWndProc;
|
WindowInfo^.DefWndProc := NCCreateParams^.DefWndProc;
|
||||||
WindowInfo^.needParentPaint := False;
|
WindowInfo^.needParentPaint := False;
|
||||||
LCLIntf.SetWindowLong(Window, GWL_ID, PtrInt(NCCreateParams^.WinControl));
|
// Ondrej: the GWL_ID is 32bit only - it makes problems on 64bit windows target. See issue #39502
|
||||||
|
// LCLIntf.SetWindowLong(Window, GWL_ID, PtrInt(NCCreateParams^.WinControl));
|
||||||
NCCreateParams^.Handled := True;
|
NCCreateParams^.Handled := True;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -723,7 +724,8 @@ begin
|
|||||||
WindowInfo^.DefWndProc := NCCreateParams^.DefWndProc;
|
WindowInfo^.DefWndProc := NCCreateParams^.DefWndProc;
|
||||||
// listbox is not a transparent control -> no need for parentpainting
|
// listbox is not a transparent control -> no need for parentpainting
|
||||||
WindowInfo^.needParentPaint := False;
|
WindowInfo^.needParentPaint := False;
|
||||||
LCLIntf.SetWindowLong(Window, GWL_ID, PtrInt(NCCreateParams^.WinControl));
|
// Ondrej: the GWL_ID is 32bit only - it makes problems on 64bit windows target. See issue #39502
|
||||||
|
//LCLIntf.SetWindowLong(Window, GWL_ID, PtrInt(NCCreateParams^.WinControl));
|
||||||
NCCreateParams^.Handled := True;
|
NCCreateParams^.Handled := True;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user