This is apparently due to the ToolStrip returning MA_ACTIVATEANDEAT on WM_MOUSEACTIVATE. I found this when I was coding my ToolStrip based tab control. A simple fix would be to return MA_ACTIVATE instead:
protected const int WM_MOUSEACTIVATE = 0x0021;
protected const int MA_ACTIVATE = 1;
protected override void WndProc(ref Message m) {
if (m.Msg == WM_MOUSEACTIVATE) {
m.Result = new IntPtr(MA_ACTIVATE);
return;
}
base.WndProc(ref m);
}
Annoying, and won't be cross platform, but at least it works!
No comments:
Post a Comment