private static bool DispatchSystemCommandMessage(ref System.Windows.Forms.Message m, TaskbarWindow taskbarWindow)
{
if (m.Msg == (int)WindowMessage.SystemCommand)
{
if (((int)m.WParam) == TabbedThumbnailNativeMethods.ScClose)
{
// Raise the event
if (taskbarWindow.TabbedThumbnail.OnTabbedThumbnailClosed())
{
// Remove the taskbar window from our internal list
if (_taskbarWindowList.Contains(taskbarWindow))
{
_taskbarWindowList.Remove(taskbarWindow);
}
taskbarWindow.Dispose();
taskbarWindow = null;
}
}
else if (((int)m.WParam) == TabbedThumbnailNativeMethods.ScMaximize)
{
// Raise the event
taskbarWindow.TabbedThumbnail.OnTabbedThumbnailMaximized();
}
else if (((int)m.WParam) == TabbedThumbnailNativeMethods.ScMinimize)
{
// Raise the event
taskbarWindow.TabbedThumbnail.OnTabbedThumbnailMinimized();
}
return(true);
}
return(false);
}