예제 #1
0
        internal override ProxySimple GetParent()
        {
            IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(_hwnd);

            if (hwndUpDown != IntPtr.Zero)
            {
                return(new WindowsSpinner(hwndUpDown, _hwnd, _parent, _item));
            }

            return(base.GetParent());
        }
예제 #2
0
        internal override ProxySimple ElementProviderFromPoint(int x, int y)
        {
            IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(_hwnd);

            if (hwndUpDown != IntPtr.Zero)
            {
                return(new WindowsSpinner(hwndUpDown, _hwnd, _parent, _item));
            }

            return(base.ElementProviderFromPoint(x, y));
        }
예제 #3
0
        private bool IsInsideOfSpinner()
        {
            IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT);

            if (hwndParent != IntPtr.Zero)
            {
                // Test for spinner - Create checks if the element is a spinner
                if (WinformsSpinner.Create(hwndParent, 0) != null)
                {
                    return(true);
                }
            }

            return(WindowsSpinner.IsSpinnerEdit(_hwnd));
        }