Example #1
0
 public int NearestIndex(Point pt)
 {
     System.Windows.Forms.NativeMethods.POINT wParam = new System.Windows.Forms.NativeMethods.POINT {
         x = pt.X,
         y = pt.Y
     };
     System.Windows.Forms.NativeMethods.LVINSERTMARK lParam = new System.Windows.Forms.NativeMethods.LVINSERTMARK();
     System.Windows.Forms.UnsafeNativeMethods.SendMessage(new HandleRef(this.listView, this.listView.Handle), 0x10a8, wParam, lParam);
     return(lParam.iItem);
 }
 public int NearestIndex(Point pt)
 {
     System.Windows.Forms.NativeMethods.POINT wParam = new System.Windows.Forms.NativeMethods.POINT {
         x = pt.X,
         y = pt.Y
     };
     System.Windows.Forms.NativeMethods.LVINSERTMARK lParam = new System.Windows.Forms.NativeMethods.LVINSERTMARK();
     System.Windows.Forms.UnsafeNativeMethods.SendMessage(new HandleRef(this.listView, this.listView.Handle), 0x10a8, wParam, lParam);
     return lParam.iItem;
 }
Example #3
0
 internal void UpdateListView()
 {
     System.Windows.Forms.NativeMethods.LVINSERTMARK lParam = new System.Windows.Forms.NativeMethods.LVINSERTMARK {
         dwFlags = this.appearsAfterItem ? 1 : 0,
         iItem   = this.index
     };
     System.Windows.Forms.UnsafeNativeMethods.SendMessage(new HandleRef(this.listView, this.listView.Handle), 0x10a6, 0, lParam);
     if (!this.color.IsEmpty)
     {
         this.listView.SendMessage(0x10aa, 0, System.Windows.Forms.SafeNativeMethods.ColorToCOLORREF(this.color));
     }
 }
 internal void UpdateListView()
 {
     System.Windows.Forms.NativeMethods.LVINSERTMARK lParam = new System.Windows.Forms.NativeMethods.LVINSERTMARK {
         dwFlags = this.appearsAfterItem ? 1 : 0,
         iItem = this.index
     };
     System.Windows.Forms.UnsafeNativeMethods.SendMessage(new HandleRef(this.listView, this.listView.Handle), 0x10a6, 0, lParam);
     if (!this.color.IsEmpty)
     {
         this.listView.SendMessage(0x10aa, 0, System.Windows.Forms.SafeNativeMethods.ColorToCOLORREF(this.color));
     }
 }