protected override void WndProc(ref Message m) { if ((m.Msg == NativeMethods.WM_NOTIFY_REFLECT) && m_bSupported) { try { NativeMethods.NMHDR nm = (NativeMethods.NMHDR)m.GetLParam( typeof(NativeMethods.NMHDR)); if (nm.code == BCN_DROPDOWN) { if (m_ctx != null) { m_ctx.ShowEx(this); return; // We handled it } else { Debug.Assert(false); } } } catch (Exception) { Debug.Assert(false); } } base.WndProc(ref m); }
private void OnHostBtnClick(object sender, EventArgs e) { if (m_btnHost == null) { Debug.Assert(false); return; } ConstructContextMenu(); m_ctx.ShowEx(m_btnHost); }