mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 13:59:14 +02:00
lcl: move WN_NCHITTEST handling of THintWindow into LCL to allow overriding (issue #0019594)
git-svn-id: trunk@31468 -
This commit is contained in:
parent
a3d1581453
commit
0ac2f35d4e
@ -820,6 +820,7 @@ type
|
||||
procedure SetHideInterval(Value : Integer);
|
||||
protected
|
||||
class procedure WSRegisterClass; override;
|
||||
procedure WMNCHitTest(var Message: TLMessage); message LM_NCHITTEST;
|
||||
procedure DoShowWindow; override;
|
||||
procedure UpdateRegion;
|
||||
public
|
||||
|
@ -979,7 +979,7 @@ end;
|
||||
procedure TCanvas.Frame3D(var ARect: TRect; TopColor, BottomColor: TColor;
|
||||
const FrameWidth: integer);
|
||||
var
|
||||
Delta, W, ii : Integer;
|
||||
W, ii : Integer;
|
||||
begin
|
||||
if ARect.Bottom-ARect.Top > ARect.Right-ARect.Left
|
||||
then
|
||||
|
@ -66,6 +66,11 @@ begin
|
||||
RegisterHintWindow;
|
||||
end;
|
||||
|
||||
procedure THintWindow.WMNCHitTest(var Message: TLMessage);
|
||||
begin
|
||||
Message.Result := HTTRANSPARENT;
|
||||
end;
|
||||
|
||||
procedure THintWindow.DoShowWindow;
|
||||
begin
|
||||
if (ActiveControl = nil) and (not (csDesigning in ComponentState)) and (Parent=nil) then
|
||||
|
@ -732,16 +732,6 @@ end;
|
||||
|
||||
{ TWin32WSHintWindow }
|
||||
|
||||
function HintWindowWndProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam; LParam: Windows.LParam): LResult; stdcall;
|
||||
begin
|
||||
case Msg of
|
||||
WM_NCHITTEST:
|
||||
Result := HTTRANSPARENT;
|
||||
else
|
||||
Result := CustomFormWndProc(Window, Msg, WParam, LParam);
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TWin32WSHintWindow.CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): HWND;
|
||||
var
|
||||
@ -760,7 +750,6 @@ begin
|
||||
Top := LongInt(CW_USEDEFAULT);
|
||||
Width := LongInt(CW_USEDEFAULT);
|
||||
Height := LongInt(CW_USEDEFAULT);
|
||||
SubClassWndProc := @HintWindowWndProc;
|
||||
end;
|
||||
// create window
|
||||
FinishCreateWindow(AWinControl, Params, false);
|
||||
|
Loading…
Reference in New Issue
Block a user