private static bool IsScrollPoint(WinApi.POINT point)
        {
            var windowUnderCursor = WinApi.WindowFromPoint(point);

            return (_rectangles.Count > 0 && CheckPoint(point)) ||
                   (_desktopScroll && windowUnderCursor == _desktopWindow) ||
                   (_taskViewScroll && _taskViewButtons.Contains(windowUnderCursor));
        }
 private void FindWindows()
 {
     _wmTaskbarCreated = WinApi.RegisterWindowMessage("TaskbarCreated");
     _taskViewButtons  = new List <IntPtr>();
     WinApi.EnumChildWindows(WinApi.GetDesktopWindow(), EnumWindow, IntPtr.Zero);
 }
 private static bool CheckPoint(WinApi.POINT point)
 {
     return _rectangles.Any(rectangle =>
         point.x > rectangle.Left &&
         point.x < rectangle.Right &&
         point.y > rectangle.Top &&
         point.y < rectangle.Bottom);
 }