R
rory.groves
I would like to force the parent window's title bar to paint as Active
when a tool window is active.
Here is my code:
public const int WM_NCACTIVATE = 0x086;
protected override void WndProc(ref
System.Windows.Forms.Message m)
{
if (m.Msg == WM_NCACTIVATE)
{
if (m.WParam == IntPtr.Zero)
{
InteropUtility.SendMessageW(this.Handle,
WM_NCACTIVATE,
new IntPtr(1), IntPtr.Zero);
return;
}
}
base.WndProc(ref m);
}
So far, i have only been able to achieve the following results:
a) parent window stays active (though painting in W2K style with no XP
theme) but child window _never becomes active_ and therefore is
unusable
b) child window can be made active but parent window always reverts to
Inactive
when a tool window is active.
Here is my code:
public const int WM_NCACTIVATE = 0x086;
protected override void WndProc(ref
System.Windows.Forms.Message m)
{
if (m.Msg == WM_NCACTIVATE)
{
if (m.WParam == IntPtr.Zero)
{
InteropUtility.SendMessageW(this.Handle,
WM_NCACTIVATE,
new IntPtr(1), IntPtr.Zero);
return;
}
}
base.WndProc(ref m);
}
So far, i have only been able to achieve the following results:
a) parent window stays active (though painting in W2K style with no XP
theme) but child window _never becomes active_ and therefore is
unusable
b) child window can be made active but parent window always reverts to
Inactive