internal static bool ModifyStyle(IntPtr hWnd, int styleToRemove, int styleToAdd) { int windowLong = NativeMethodsUltimate.GetWindowLong(hWnd, NativeMethodsUltimate.GWL.STYLE); int num = (windowLong & ~styleToRemove) | styleToAdd; if (num == windowLong) { return(false); } NativeMethodsUltimate.SetWindowLong(hWnd, NativeMethodsUltimate.GWL.STYLE, num); return(true); }
private void SubclassWndProc() { this.wndProc = new NativeMethodsUltimate.WndProc(this.WndProc); NativeMethodsUltimate.SetWindowLong(this.handle, -4, Marshal.GetFunctionPointerForDelegate(this.wndProc)); }