- Timestamp:
- Dec 22, 2018, 4:39:19 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Components/DrawDlg.pas
r111 r159 66 66 procedure TDrawDlg.OnHitTest(var Msg: TMessage); 67 67 var 68 i: integer;68 I: integer; 69 69 ControlBounds: TRect; 70 Pos: TPoint; 70 71 begin 71 72 if BorderStyle <> bsNone then … … 73 74 else 74 75 begin 75 if integer((Msg.LParam shr 16) and $ffff) >= Top + TitleHeight then 76 Msg.result := HTCLIENT 76 Pos := Point(Integer(Msg.LParam and $ffff), 77 Integer((Msg.LParam shr 16) and $ffff)); 78 if Pos.Y >= Top + TitleHeight then 79 Msg.Result := HTCLIENT 77 80 else 78 81 begin 79 for i:= 0 to ControlCount - 1 do80 if Controls[ i].Visible then82 for I := 0 to ControlCount - 1 do 83 if Controls[I].Visible then 81 84 begin 82 ControlBounds := Controls[ i].BoundsRect;83 if ( integer(Msg.LParam and $ffff)>= Left + ControlBounds.Left) and84 ( integer(Msg.LParam and $ffff)< Left + ControlBounds.Right) and85 ( integer((Msg.LParam shr 16 ) and $ffff)>= Top + ControlBounds.Top) and86 ( integer((Msg.LParam shr 16) and $ffff)< Top + ControlBounds.Bottom) then85 ControlBounds := Controls[I].BoundsRect; 86 if (Pos.X >= Left + ControlBounds.Left) and 87 (Pos.X < Left + ControlBounds.Right) and 88 (Pos.Y >= Top + ControlBounds.Top) and 89 (Pos.Y < Top + ControlBounds.Bottom) then 87 90 begin 88 91 Msg.result := HTCLIENT; 89 exit;92 Exit; 90 93 end; 91 94 end; 92 Msg. result := HTCAPTION93 end; 94 end 95 Msg.Result := HTCAPTION 96 end; 97 end; 95 98 end; 96 99
Note:
See TracChangeset
for help on using the changeset viewer.