public static bool ModifyStyleEx(IntPtr hWnd, exStyles dwRemove, exStyles dwAdd, uint nFlags) { Trace.Assert(IsWindow(hWnd)); uint dwStyle = GetWindowLong(hWnd, indices.GWL_EXSTYLE); uint dwNewStyle = (dwStyle & ~(uint)dwRemove) | (uint)dwAdd; if (dwStyle == dwNewStyle) { return(false); } SetWindowLong(hWnd, indices.GWL_EXSTYLE, dwNewStyle); if (nFlags != 0) { SetWindowPos(hWnd, IntPtr.Zero, 0, 0, 0, 0, posFlags.SWP_NOSIZE | posFlags.SWP_NOMOVE | posFlags.SWP_NOZORDER | posFlags.SWP_NOACTIVATE | (posFlags)nFlags); } return(true); }
public static bool ModifyStyleEx(IntPtr hWnd, exStyles dwRemove, exStyles dwAdd, uint nFlags) { Trace.Assert(IsWindow(hWnd)); uint dwStyle = GetWindowLong(hWnd, indices.GWL_EXSTYLE); uint dwNewStyle = (dwStyle & ~(uint) dwRemove) | (uint) dwAdd; if (dwStyle == dwNewStyle) return false; SetWindowLong(hWnd, indices.GWL_EXSTYLE, dwNewStyle); if (nFlags != 0) { SetWindowPos(hWnd, IntPtr.Zero, 0, 0, 0, 0, posFlags.SWP_NOSIZE | posFlags.SWP_NOMOVE | posFlags.SWP_NOZORDER | posFlags.SWP_NOACTIVATE | (posFlags) nFlags); } return true; }
public static bool ModifyStyleEx(IntPtr hWnd, exStyles dwRemove, exStyles dwAdd) { return ModifyStyleEx(hWnd, dwRemove, dwAdd, 0); }
public static bool ModifyStyleEx(IntPtr hWnd, exStyles dwRemove, exStyles dwAdd) { return(ModifyStyleEx(hWnd, dwRemove, dwAdd, 0)); }