public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, IntPtr hRgn, Point pt, HitTestOptions options) {
            if( dc == null ){
                throw new ArgumentNullException("dc");
            }
            
            int htCode = 0;
            NativeMethods.POINTSTRUCT point = new NativeMethods.POINTSTRUCT(pt.X, pt.Y);

            using( WindowsGraphicsWrapper wgr = new WindowsGraphicsWrapper( dc, AllGraphicsProperties ) ) {
                HandleRef hdc = new HandleRef( wgr, wgr.WindowsGraphics.DeviceContext.Hdc );
                lastHResult = SafeNativeMethods.HitTestThemeBackground( new HandleRef( this, Handle ), hdc, part, state, (int) options, new NativeMethods.COMRECT( backgroundRectangle ), new HandleRef( this, hRgn ), point, ref htCode );
            }

            return (HitTestCode)htCode;
        }
 public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, IntPtr hRgn, Point pt, HitTestOptions options)
 {
     if (dc == null)
     {
         throw new ArgumentNullException("dc");
     }
     int pwHitTestCode = 0;
     System.Windows.Forms.NativeMethods.POINTSTRUCT ptTest = new System.Windows.Forms.NativeMethods.POINTSTRUCT(pt.X, pt.Y);
     using (WindowsGraphicsWrapper wrapper = new WindowsGraphicsWrapper(dc, TextFormatFlags.PreserveGraphicsTranslateTransform | TextFormatFlags.PreserveGraphicsClipping))
     {
         HandleRef hdc = new HandleRef(wrapper, wrapper.WindowsGraphics.DeviceContext.Hdc);
         this.lastHResult = System.Windows.Forms.SafeNativeMethods.HitTestThemeBackground(new HandleRef(this, this.Handle), hdc, this.part, this.state, (int) options, new System.Windows.Forms.NativeMethods.COMRECT(backgroundRectangle), new HandleRef(this, hRgn), ptTest, ref pwHitTestCode);
     }
     return (HitTestCode) pwHitTestCode;
 }
        public HitTestCode HitTestBackground(Graphics g, Rectangle backgroundRectangle, Region region, Point pt, HitTestOptions options) {
            if (g == null) {
                throw new ArgumentNullException("g");
            }

            IntPtr hRgn = region.GetHrgn(g);

            return HitTestBackground(g, backgroundRectangle, hRgn, pt, options);
        }
예제 #4
0
        /// <summary>
        ///  [See win32 equivalent.]
        /// </summary>
        public HitTestCode HitTestBackground(Graphics g, Rectangle backgroundRectangle, Region region, Point pt, HitTestOptions options)
        {
            if (g == null)
            {
                throw new ArgumentNullException(nameof(g));
            }

            IntPtr hRgn = region.GetHrgn(g);

            return(HitTestBackground(g, backgroundRectangle, hRgn, pt, options));
        }
 public HitTestCode HitTestBackground(System.Drawing.IDeviceContext dc, System.Drawing.Rectangle backgroundRectangle, System.IntPtr hRgn, System.Drawing.Point pt, HitTestOptions options)
 {
 }
예제 #6
0
        public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle_ backgroundRectangle, IntPtr hRgn, Point_ pt, HitTestOptions options)
        {
            if (dc == null)
            {
                throw new ArgumentNullException("dc");
            }

            HitTestCode result;

            last_hresult = VisualStyles.UxThemeHitTestThemeBackground(theme, dc, this.part, this.state, options, backgroundRectangle, hRgn, pt, out result);
            return(result);
        }
예제 #7
0
        public int UxThemeHitTestThemeBackground(IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, HitTestOptions options, Rectangle_ backgroundRectangle, IntPtr hrgn, Point_ pt, out HitTestCode result)
        {
            XplatUIWin32.RECT BoundsRect = XplatUIWin32.RECT.FromRectangle(backgroundRectangle);
            HitTestCode       retval;

            int hresult = UXTheme.HitTestThemeBackground(hTheme, dc.GetHdc(), iPartId, iStateId, (uint)options, ref BoundsRect, hrgn, new POINT(pt.X, pt.Y), out retval);

            dc.ReleaseHdc();

            result = (HitTestCode)retval;
            return(hresult);
        }
예제 #8
0
 public HitTestCode HitTestBackground(Graphics g, Rectangle backgroundRectangle, Region region, Point pt, HitTestOptions options)
 {
     throw null;
 }
예제 #9
0
 public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, IntPtr hRgn, Point pt, HitTestOptions options)
 {
     throw null;
 }
예제 #10
0
        /// <summary>
        ///  [See win32 equivalent.]
        /// </summary>
        public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, Point pt, HitTestOptions options)
        {
            ArgumentNullException.ThrowIfNull(dc);

            using var hdc = new DeviceContextHdcScope(dc);
            RECT backgroundRect = backgroundRectangle;

            _lastHResult = HitTestThemeBackground(this, hdc, Part, State, (uint)options, ref backgroundRect, IntPtr.Zero, pt, out ushort htCode);
            return((HitTestCode)htCode);
        }
예제 #11
0
        /// <summary>
        ///  [See win32 equivalent.]
        /// </summary>
        public HitTestCode HitTestBackground(Graphics g, Rectangle backgroundRectangle, Region region, Point pt, HitTestOptions options)
        {
            ArgumentNullException.ThrowIfNull(g);
            ArgumentNullException.ThrowIfNull(region);

            IntPtr hRgn = region.GetHrgn(g);

            return(HitTestBackground(g, backgroundRectangle, hRgn, pt, options));
        }
		public int UxThemeHitTestThemeBackground (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, HitTestOptions options, Rectangle backgroundRectangle, IntPtr hrgn, Point pt, out HitTestCode result)
		{
			result = HitTestCode.Bottom;
			return (int)S.S_FALSE;
		}
예제 #13
0
        /// <summary>
        ///  [See win32 equivalent.]
        /// </summary>
        public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, IntPtr hRgn, Point pt, HitTestOptions options)
        {
            if (dc == null)
            {
                throw new ArgumentNullException(nameof(dc));
            }

            using var wgr = new WindowsGraphicsWrapper(dc, AllGraphicsProperties);
            var  hdc            = new HandleRef(wgr, wgr.WindowsGraphics.DeviceContext.Hdc);
            RECT backgroundRect = backgroundRectangle;

            lastHResult = HitTestThemeBackground(this, hdc, part, state, (uint)options, ref backgroundRect, hRgn, pt, out ushort htCode);
            return((HitTestCode)htCode);
        }
예제 #14
0
        public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, IntPtr hRgn, Point pt, HitTestOptions options)
        {
            if (dc == null)
            {
                throw new ArgumentNullException("dc");
            }
            int pwHitTestCode = 0;

            System.Windows.Forms.NativeMethods.POINTSTRUCT ptTest = new System.Windows.Forms.NativeMethods.POINTSTRUCT(pt.X, pt.Y);
            using (WindowsGraphicsWrapper wrapper = new WindowsGraphicsWrapper(dc, TextFormatFlags.PreserveGraphicsTranslateTransform | TextFormatFlags.PreserveGraphicsClipping))
            {
                HandleRef hdc = new HandleRef(wrapper, wrapper.WindowsGraphics.DeviceContext.Hdc);
                this.lastHResult = System.Windows.Forms.SafeNativeMethods.HitTestThemeBackground(new HandleRef(this, this.Handle), hdc, this.part, this.state, (int)options, new System.Windows.Forms.NativeMethods.COMRECT(backgroundRectangle), new HandleRef(this, hRgn), ptTest, ref pwHitTestCode);
            }
            return((HitTestCode)pwHitTestCode);
        }
예제 #15
0
 public HitTestCode HitTestBackground(System.Drawing.Graphics g, System.Drawing.Rectangle backgroundRectangle, System.Drawing.Region region, System.Drawing.Point pt, HitTestOptions options)
 {
 }
		public HitTestCode HitTestBackground (IDeviceContext dc, Rectangle backgroundRectangle, IntPtr hRgn, Point pt, HitTestOptions options)
		{
			if (dc == null)
				throw new ArgumentNullException ("dc");

			HitTestCode result;
			last_hresult = VisualStyles.UxThemeHitTestThemeBackground(theme, dc, this.part, this.state, options, backgroundRectangle, hRgn, pt, out result);
			return result;
		}
예제 #17
0
 public HitTestCode HitTestBackground(System.Drawing.IDeviceContext dc, System.Drawing.Rectangle backgroundRectangle, System.IntPtr hRgn, System.Drawing.Point pt, HitTestOptions options)
 {
 }
		public HitTestCode HitTestBackground (IDeviceContext dc, Rectangle backgroundRectangle, Point pt, HitTestOptions options)
		{
			return this.HitTestBackground (dc, backgroundRectangle, IntPtr.Zero, pt, options);
		}
예제 #19
0
 public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle_ backgroundRectangle, Point_ pt, HitTestOptions options)
 {
     return(this.HitTestBackground(dc, backgroundRectangle, IntPtr.Zero, pt, options));
 }
예제 #20
0
		public int UxThemeHitTestThemeBackground (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, HitTestOptions options, Rectangle backgroundRectangle, IntPtr hrgn, Point pt, out HitTestCode result)
		{
			XplatUIWin32.RECT BoundsRect = XplatUIWin32.RECT.FromRectangle (backgroundRectangle);
			int retval;

			int hresult = UXTheme.HitTestThemeBackground (hTheme, dc.GetHdc (), iPartId, iStateId, (uint)options, ref BoundsRect, hrgn, new POINT(pt.X, pt.Y), out retval);
			dc.ReleaseHdc ();

			result = (HitTestCode)retval;
			return hresult;
		}
예제 #21
0
        /// <summary>
        ///  [See win32 equivalent.]
        /// </summary>
        public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, IntPtr hRgn, Point pt, HitTestOptions options)
        {
            if (dc is null)
            {
                throw new ArgumentNullException(nameof(dc));
            }

            using var hdc = new DeviceContextHdcScope(dc);
            RECT backgroundRect = backgroundRectangle;

            _lastHResult = HitTestThemeBackground(this, hdc, Part, State, (uint)options, ref backgroundRect, hRgn, pt, out ushort htCode);
            return((HitTestCode)htCode);
        }
예제 #22
0
 public int UxThemeHitTestThemeBackground(IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, HitTestOptions options, Rectangle backgroundRectangle, IntPtr hrgn, Point pt, out HitTestCode result) => throw new InvalidOperationException();
예제 #23
0
        /// <summary>
        ///  [See win32 equivalent.]
        /// </summary>
        public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, IntPtr hRgn, Point pt, HitTestOptions options)
        {
            if (dc == null)
            {
                throw new ArgumentNullException(nameof(dc));
            }

            int htCode = 0;

            NativeMethods.POINTSTRUCT point = new NativeMethods.POINTSTRUCT(pt.X, pt.Y);

            using (WindowsGraphicsWrapper wgr = new WindowsGraphicsWrapper(dc, AllGraphicsProperties))
            {
                HandleRef hdc = new HandleRef(wgr, wgr.WindowsGraphics.DeviceContext.Hdc);
                lastHResult = SafeNativeMethods.HitTestThemeBackground(new HandleRef(this, Handle), hdc, part, state, (int)options, new NativeMethods.COMRECT(backgroundRectangle), new HandleRef(this, hRgn), point, ref htCode);
            }

            return((HitTestCode)htCode);
        }
 public HitTestCode HitTestBackground(System.Drawing.Graphics g, System.Drawing.Rectangle backgroundRectangle, System.Drawing.Region region, System.Drawing.Point pt, HitTestOptions options)
 {
 }