protected override void WndProc(ref Message m)
{
//0x0212 == WM_EXITMENULOOP
if (m.Msg == 0x0212)
{
//this message is only sent when a ContextMenu is closed (not a ContextMenuStrip)
isSplitMenuVisible = false;
SetButtonDrawState();
}
base.WndProc(ref m);
}