protected override void WndProc(ref Message m) { if (m.Msg == Constants.Win32.Messages.WM_LBUTTONDBLCLK) { Point mouse = PointToClient(MousePosition); if (GetItemAt(mouse.X, mouse.Y) != null) { // Double-clicked on an item - ignore the ItemCheck event resulting from this. m_ignoreNextCheck = true; } } else if (m.Msg == Constants.Win32.Messages.WM_NOTIFY) { Win32.NMHDR nmhdr = (Win32.NMHDR)m.GetLParam(typeof(Win32.NMHDR)); WmNotify((IntPtr)nmhdr.hwndFrom, nmhdr.code); } // If the base ListView WndProc processes WM_SETCURSOR the cursor is not actually changed - see // http://www.dotnet247.com/247reference/msgs/52/260249.aspx // Set the cursor manually to work around this. if (m.Msg == Constants.Win32.Messages.WM_SETCURSOR) { WmSetCursor(ref m); } else { base.WndProc(ref m); } }
protected override void WndProc(ref Message m) { const int wmReflectNotify = Constants.Win32.Messages.WM_REFLECT + Constants.Win32.Messages.WM_NOTIFY; bool processed = false; switch (m.Msg) { case Constants.Win32.Messages.WM_NOTIFY: case wmReflectNotify: Win32.NMHDR nmhdr = (Win32.NMHDR)m.GetLParam(typeof(Win32.NMHDR)); if (nmhdr.code == Constants.Win32.Notifications.TCN_SELCHANGING) { processed = WmSelChanging(ref m); } break; } if (!processed) { base.WndProc(ref m); } }