Beispiel #1
0
 public int GetBandIndexAt(Point point)
 {
     NativeMethods.RBHITTESTINFO hitTest = new NativeMethods.RBHITTESTINFO();
     hitTest.pt = point;
     if (IsHandleCreated)
     {
         UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.RB_HITTEST, IntPtr.Zero, ref hitTest);
     }
     return(hitTest.iBand);
 }
Beispiel #2
0
 public RebarBand GetBandAt(Point point)
 {
     NativeMethods.RBHITTESTINFO hitTest = new NativeMethods.RBHITTESTINFO();
     hitTest.pt = point;
     if (IsHandleCreated)
     {
         UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.RB_HITTEST, IntPtr.Zero, ref hitTest);
     }
     if (hitTest.iBand != -1)
     {
         return(Bands[hitTest.iBand]);
     }
     return(null);
 }