示例#1
0
        /// <summary>
        // This static method is required because legacy OSes do not support SetWindowLongPtr
        /// </summary>
        public static WindowStyleFlags SetWindowLong(IntPtr hWnd, WindowLongIndex nIndex, WindowStyleFlags dwNewLong)
        {
            if (IntPtr.Size == 8)
            {
                return(Native.SetWindowLong64(hWnd, nIndex, dwNewLong));
            }

            return(Native.SetWindowLong32(hWnd, nIndex, dwNewLong));
        }
示例#2
0
        /// <summary>
        // This static method is required because legacy OSes do not support SetWindowLongPtr
        /// </summary>
        public static WindowStyleFlags GetWindowLong(IntPtr hWnd, WindowLongIndex nIndex)
        {
            if (IntPtr.Size == 8)
            {
                return(GetWindowLong64(hWnd, nIndex));
            }

            return(GetWindowLong32(hWnd, nIndex));
        }
示例#3
0
 /// <summary>
 ///     Wrapper for the SetWindowLong which decides if the system is 64-bit or not and calls the right one.
 /// </summary>
 /// <param name="hwnd">IntPtr</param>
 /// <param name="index">WindowLongIndex</param>
 /// <param name="styleFlags"></param>
 public static void SetWindowLongWrapper(IntPtr hwnd, WindowLongIndex index, IntPtr styleFlags)
 {
     if (IntPtr.Size == 8)
     {
         SetWindowLongPtr(hwnd, index, styleFlags);
     }
     else
     {
         SetWindowLong(hwnd, index, styleFlags.ToInt32());
     }
 }
示例#4
0
 // This static method is required because Win32 does not support
 // GetWindowLongPtr directly
 public static IntPtr GetWindowLongPtr(IntPtr hWnd, WindowLongIndex nIndex)
 {
     if (IntPtr.Size == 8)
     {
         return(GetWindowLongPtr64(hWnd, nIndex));
     }
     else
     {
         return(GetWindowLongPtr32(hWnd, nIndex));
     }
 }
示例#5
0
文件: WinAPI.cs 项目: Stryxus/BordeX
 public static WindowStyles SetWindowLong(IntPtr hWnd, WindowLongIndex nIndex, WindowStyles dwNewLong)
 {
     if (IntPtr.Size == 8)
     {
         return(SetWindowLong64(hWnd, nIndex, dwNewLong));
     }
     else
     {
         return(SetWindowLong32(hWnd, nIndex, dwNewLong));
     }
 }
示例#6
0
        /// <summary>
        /// Changes attributes of a window.
        /// </summary>
        public static IntPtr SetWindowLong(IntPtr windowHandle, WindowLongIndex index, IntPtr newLong)
        {
            IntPtr result;

            if (Environment.Is64BitProcess)
            {
                result = SetWindowLong64(windowHandle, (int)index, newLong);
            }
            else
            {
                result = SetWindowLong32(windowHandle, (int)index, newLong);
            }

            if (result == IntPtr.Zero)
            {
                int hResult = Marshal.GetHRForLastWin32Error();
                Marshal.ThrowExceptionForHR(hResult);
            }
            return(result);
        }
示例#7
0
 public static extern WindowStyleFlags SetWindowLong(IntPtr hWnd, WindowLongIndex nIndex,
     WindowStyleFlags dwNewLong);
示例#8
0
 private static extern WindowStyleFlags GetWindowLong64(IntPtr hWnd, WindowLongIndex nIndex);
示例#9
0
    public static uint GetWindowLongPtr(IntPtr handle, WindowLongIndex nIndex)
    {
        var rVal = (uint)(Platform.Is64Bit ? (uint)GetWindowLongPtr64(handle, nIndex).ToInt32() : GetWindowLongPtr32(handle, nIndex));

        return(rVal);
    }
示例#10
0
 public static IntPtr GetWindowLong(IntPtr hWnd, WindowLongIndex nIndex)
 {
     return IntPtr.Size == 4 ? NativeMethods.GetWindowLong32(hWnd, (int)nIndex) : NativeMethods.GetWindowLongPtr64(hWnd, (int)nIndex);
 }
示例#11
0
 public static WindowStyle GetWindowLong(IntPtr hWnd, WindowLongIndex nIndex)
 {
     return(IntPtr.Size == 8 ? GetWindowLong64(hWnd, nIndex) : GetWindowLong32(hWnd, nIndex));
 }
示例#12
0
        /// <summary>
        // This static method is required because legacy OSes do not support SetWindowLongPtr 
        /// </summary>
        public static WindowStyleFlags SetWindowLong(IntPtr hWnd, WindowLongIndex nIndex, WindowStyleFlags dwNewLong)
        {
            if (IntPtr.Size == 8)
                return Native.SetWindowLong64(hWnd, nIndex, dwNewLong);

            return Native.SetWindowLong32(hWnd, nIndex, dwNewLong);
        }
示例#13
0
文件: WinAPI.cs 项目: Stryxus/BordeX
 internal static extern WindowStyles SetWindowLong64(IntPtr hWnd, WindowLongIndex nIndex, WindowStyles dwNewLong);
示例#14
0
 private static extern WindowStyle SetWindowLong64(IntPtr hWnd, WindowLongIndex nIndex, WindowStyle dwNewLong);
示例#15
0
        /// <summary>
        // This static method is required because legacy OSes do not support SetWindowLongPtr 
        /// </summary>
        public static WindowStyleFlags GetWindowLong(IntPtr hWnd, WindowLongIndex nIndex)
        {
            if (IntPtr.Size == 8)
                return Native.GetWindowLong64(hWnd, nIndex);

            return Native.GetWindowLong32(hWnd, nIndex);
        }
示例#16
0
 static extern uint GetWindowLong(IntPtr handle, WindowLongIndex index);
示例#17
0
 private static extern IntPtr GetWindowLongPtr64(IntPtr hWnd, WindowLongIndex nIndex);
示例#18
0
文件: Win32API.cs 项目: kazu3516/Kucl
 public static int SetWindowLong(IntPtr hWnd, WindowLongIndex nIndex, int newValue)
 {
     return(Win32API.SetWindowLong(hWnd, (short)nIndex, newValue));
 }
示例#19
0
文件: Win32API.cs 项目: kazu3516/Kucl
 public static int GetWindowLong(IntPtr hWnd, WindowLongIndex nIndex)
 {
     return(Win32API.GetWindowLong(hWnd, (short)nIndex));
 }
示例#20
0
 public static extern int SetWindowLong(IntPtr hWnd, WindowLongIndex nIndex, WindowStylesEx dwNewLong);
示例#21
0
文件: WinAPI.cs 项目: Stryxus/BordeX
 internal static extern WindowStyles GetWindowLong64(IntPtr hWnd, WindowLongIndex nIndex);
示例#22
0
 private static extern WindowStyle GetWindowLong64(IntPtr hWnd, WindowLongIndex nIndex);
示例#23
0
 static extern uint GetWindowLongPtr32(IntPtr handle, WindowLongIndex nIndex);
示例#24
0
 public static WindowStyle SetWindowLong(IntPtr hWnd, WindowLongIndex nIndex, WindowStyle dwNewLong)
 {
     return(IntPtr.Size == 8 ? SetWindowLong64(hWnd, nIndex, dwNewLong) : SetWindowLong32(hWnd, nIndex, dwNewLong));
 }
示例#25
0
 static extern IntPtr GetWindowLongPtr64(IntPtr handle, WindowLongIndex nIndex);
示例#26
0
 public static extern IntPtr SetWindowLong(IntPtr hwnd, WindowLongIndex index, IntPtr handle);
示例#27
0
 private static extern WindowStyleFlags SetWindowLong64(IntPtr hWnd, WindowLongIndex nIndex, WindowStyleFlags dwNewLong);
示例#28
0
 static extern uint SetWindowLongPtr32(IntPtr handle, WindowLongIndex nIndex, uint newLong);
示例#29
0
 public static extern int GetWindowLongPtr(IntPtr hwnd, WindowLongIndex nIndex);
示例#30
0
 static extern IntPtr SetWindowLongPtr64(IntPtr handle, WindowLongIndex nIndex, IntPtr newLong);
示例#31
0
 private static extern WindowStyleFlags GetWindowLong32(IntPtr hWnd, WindowLongIndex nIndex);
示例#32
0
    public unsafe static uint SetWindowLongPtr(IntPtr handle, WindowLongIndex nIndex, uint newLong)
    {
        var rVal = (uint)(Platform.Is64Bit ? (uint)SetWindowLongPtr64(handle, nIndex, new IntPtr(&newLong)).ToInt32() : SetWindowLongPtr32(handle, nIndex, newLong));

        return(rVal);
    }
示例#33
0
 public static extern IntPtr SetWindowLongPtr(IntPtr hWnd, WindowLongIndex nIndex, uint value);
示例#34
0
 public static extern WindowStyleFlags GetWindowLong(IntPtr hWnd, WindowLongIndex nIndex);
示例#35
0
 private static extern WindowStyleFlags SetWindowLong32(IntPtr hWnd, WindowLongIndex nIndex,
                                                        WindowStyleFlags dwNewLong);
示例#36
0
 public static extern WindowStylesEx GetWindowLong(IntPtr hWnd, WindowLongIndex nIndex);
示例#37
0
 public static extern int SetWindowLong(IntPtr hWnd, WindowLongIndex index, int dwNewLong);