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);
protected
class procedure WSRegisterClass; override;
procedure WMNCHitTest(var Message: TLMessage); message LM_NCHITTEST;
procedure DoShowWindow; override;
procedure UpdateRegion;
public

View File

@ -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

View File

@ -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

View File

@ -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);