Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

Remove Borders and Caption From Window (Easier to Edit and Set Flags)

Description
This function is 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.
Language
C#.net
Minimum Version
Created By
Derek Ziemba
Contributors
-
Date Created
Nov 6, 2014
Date Last Modified
Nov 6, 2014

Scripted Function (Macro) Code

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); 
	}
}