using System;
using System.Drawing;
using WS = BFS.WindowEnum.WindowStyle;
// Based off of Thomas999's implementation, just implemented different so it's easy to toggle
// different flags on and off. Makes it easier to play around and see what each flag does.
public static class DisplayFusionFunction
{
private static void SetFlag(ref WS style, WS mask, IntPtr handle) {
style = BFS.Window.HasWindowStyle(mask, handle) ? style &= ~mask : style |= mask;
}
public static void Run(IntPtr handle)
{
//get the current style of the window
WS style = BFS.Window.GetWindowStyle(handle);
SetFlag(ref style, WS.WS_CAPTION, handle);
SetFlag(ref style, WS.WS_SYSMENU, handle);
SetFlag(ref style, WS.WS_THICKFRAME__SIZEBOX, handle);
SetFlag(ref style, WS.WS_MINIMIZEBOX, handle);
SetFlag(ref style, WS.WS_MAXIMIZEBOX, handle);
//set the new style to the window
BFS.Window.SetWindowStyle(style, handle);
}
}