lcl: move WN_NCHITTEST handling of THintWindow into LCL to allow overriding (issue #0019594)

git-svn-id: trunk@31468 -
This commit is contained in:
paul 2011-06-30 06:30:12 +00:00
parent a3d1581453
commit 0ac2f35d4e
4 changed files with 7 additions and 12 deletions

View File

@ -820,6 +820,7 @@ type
procedure SetHideInterval(Value : Integer); procedure SetHideInterval(Value : Integer);
protected protected
class procedure WSRegisterClass; override; class procedure WSRegisterClass; override;
procedure WMNCHitTest(var Message: TLMessage); message LM_NCHITTEST;
procedure DoShowWindow; override; procedure DoShowWindow; override;
procedure UpdateRegion; procedure UpdateRegion;
public public

View File

@ -979,7 +979,7 @@ end;
procedure TCanvas.Frame3D(var ARect: TRect; TopColor, BottomColor: TColor; procedure TCanvas.Frame3D(var ARect: TRect; TopColor, BottomColor: TColor;
const FrameWidth: integer); const FrameWidth: integer);
var var
Delta, W, ii : Integer; W, ii : Integer;
begin begin
if ARect.Bottom-ARect.Top > ARect.Right-ARect.Left if ARect.Bottom-ARect.Top > ARect.Right-ARect.Left
then then

View File

@ -66,6 +66,11 @@ begin
RegisterHintWindow; RegisterHintWindow;
end; end;
procedure THintWindow.WMNCHitTest(var Message: TLMessage);
begin
Message.Result := HTTRANSPARENT;
end;
procedure THintWindow.DoShowWindow; procedure THintWindow.DoShowWindow;
begin begin
if (ActiveControl = nil) and (not (csDesigning in ComponentState)) and (Parent=nil) then if (ActiveControl = nil) and (not (csDesigning in ComponentState)) and (Parent=nil) then

View File

@ -732,16 +732,6 @@ end;
{ TWin32WSHintWindow } { 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; class function TWin32WSHintWindow.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND; const AParams: TCreateParams): HWND;
var var
@ -760,7 +750,6 @@ begin
Top := LongInt(CW_USEDEFAULT); Top := LongInt(CW_USEDEFAULT);
Width := LongInt(CW_USEDEFAULT); Width := LongInt(CW_USEDEFAULT);
Height := LongInt(CW_USEDEFAULT); Height := LongInt(CW_USEDEFAULT);
SubClassWndProc := @HintWindowWndProc;
end; end;
// create window // create window
FinishCreateWindow(AWinControl, Params, false); FinishCreateWindow(AWinControl, Params, false);