winform中datagridview 中checkbox双击后 AfterCheck事件只触发一次的解决方式

xiaoxiao2021-09-21  137

protected override void WndProc(ref Message m) { if (m.Msg == WM_LBUTTONDBLCLK) { Point p = new Point((int)m.LParam); HitTestInfo tvhti = HitTest(p.X, p.Y); m.Result = IntPtr.Zero; return; //if (tvhti != null && tvhti.Location == TreeViewHitTestLocations.StateImage) //{ // m.Result = IntPtr.Zero; // return; //} } else if (m.Msg == WM_RBUTTONDOWN) { Point p = new Point((int)m.LParam); HitTestInfo tvhti = HitTest(p.X, p.Y); //if (tvhti != null) // SelectedNode = tvhti.Node; } base.WndProc(ref m); }

 

转载请注明原文地址: https://www.6miu.com/read-4823645.html

最新回复(0)