Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 private void SubclassWndProc()
 {
     this.wndProc = new NativeMethodsUltimate.WndProc(this.WndProc);
     NativeMethodsUltimate.SetWindowLong(this.handle, -4, Marshal.GetFunctionPointerForDelegate(this.wndProc));
 }