internal void SetStyle(Win32.WS style, bool value) { var styleInt = Win32.GetWindowLong(WindowHandle, Win32.GWL.STYLE); if (value) { styleInt |= (uint)style; } else { styleInt &= (uint)~style; } Win32.SetWindowLong(WindowHandle, Win32.GWL.STYLE, styleInt); }
public static Win32.WS UpdateStyle(Win32.WS style, TitleBarStyle settings) { if (settings.ShowTitleBar) { style |= Win32.WS.WS_CAPTION; } else { style &= ~Win32.WS.WS_CAPTION; } if (settings.ShowSizingBorder) { style |= Win32.WS.WS_THICKFRAME; } else { style &= ~Win32.WS.WS_THICKFRAME; } return(style); }
private void SetStyle(IWindow window, Win32.WS style) { Win32.SetWindowLongPtr(window.Handle, Win32.GWL_STYLE, (IntPtr)style); }