本文整理汇总了C#中GWL类的典型用法代码示例。如果您正苦于以下问题:C# GWL类的具体用法?C# GWL怎么用?C# GWL使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GWL类属于命名空间,在下文中一共展示了GWL类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetWindowLongPtr
internal static IntPtr GetWindowLongPtr(HandleRef hWnd, GWL nIndex)
{
IntPtr zero = IntPtr.Zero;
int num = 0;
SetLastError(0);
if (IntPtr.Size == 4)
{
int num2 = IntGetWindowLong(hWnd, (int)nIndex);
num = Marshal.GetLastWin32Error();
zero = new IntPtr(num2);
}
else
{
zero = IntGetWindowLongPtr(hWnd, (int)nIndex);
num = Marshal.GetLastWin32Error();
}
if (zero == IntPtr.Zero)
{
}
return zero;
}
示例2: GetWindowLongPtr32
private static extern int GetWindowLongPtr32(IntPtr hWnd, GWL nIndex);
示例3: SetWindowLongPtr32
private static extern int SetWindowLongPtr32(IntPtr hWnd, GWL nIndex, int dwNewLong);
示例4: GetWindowLongPtr
public static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL nIndex)
{
IntPtr ret = IntPtr.Zero;
if (8 == IntPtr.Size)
{
ret = NativeMethodsSetLastError.GetWindowLongPtr(hwnd, (int)nIndex);
}
else
{
ret = new IntPtr(NativeMethodsSetLastError.GetWindowLong(hwnd, (int)nIndex));
}
if (IntPtr.Zero == ret)
{
throw new Win32Exception();
}
return ret;
}
示例5: GetWindowLongPtr
public static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL nIndex)
{
IntPtr ret = IntPtr.Zero;
if (8 == IntPtr.Size)
{
ret = GetWindowLongPtr64(hwnd, nIndex);
}
else
{
ret = new IntPtr(GetWindowLongPtr32(hwnd, nIndex));
}
if (IntPtr.Zero == ret)
{
throw new Win32Exception();
}
return ret;
}
示例6: GetWindowLongPtr
/// <summary>
/// Gets a window long pointer.
/// </summary>
/// <param name="hWnd">The window handle.</param>
/// <param name="nIndex">Index of the data to retreive.</param>
/// <returns>IntPtr of retreived data.</returns>
public static IntPtr GetWindowLongPtr(IntPtr hWnd, GWL nIndex)
{
if (IntPtr.Size == 8)
return GetWindowLongPtr64(hWnd, nIndex);
else
return GetWindowLongPtr32(hWnd, nIndex);
}
示例7: GetWindowLong
/// <summary>
///
/// </summary>
/// <param name="hwnd"></param>
/// <param name="index"></param>
/// <returns></returns>
public static int GetWindowLong(IntPtr hwnd, GWL index)
{
return NativeMethods.GetWindowLong(hwnd, index);
}
示例8: SetWindowLong
public static extern int SetWindowLong(HWND hwnd, GWL nIndex, int dwNewLong);
示例9: SetWindowLongPtr
public static IntPtr SetWindowLongPtr(HWND hwnd, GWL nIndex, IntPtr dwNewLong)
{
if (IntPtr.Size == 4) {
// The SetWindowLongPtr entrypoint may not exist on 32-bit
// OSes, so use the legacy SetWindowLong function instead.
return new IntPtr(SetWindowLong(hwnd, nIndex, dwNewLong.ToInt32()));
} else {
return _SetWindowLongPtr(hwnd, nIndex, dwNewLong);
}
}
示例10: GetWindowLong
public static extern int GetWindowLong(HWND hwnd, GWL nIndex);
示例11: GetWindowLongPtr
public static IntPtr GetWindowLongPtr(HWND hwnd, GWL nIndex)
{
if (IntPtr.Size == 4) {
// The SetWindowLongPtr entrypoint may not exist on 32-bit
// OSes, so use the legacy SetWindowLong function instead.
return new IntPtr(GetWindowLong(hwnd, nIndex));
} else {
return _GetWindowLongPtr(hwnd, nIndex);
}
}
示例12: SetWindowLong
internal static extern uint SetWindowLong(IntPtr hwnd, GWL nIndex, uint dwNewLong);
示例13: SetWindowLong
public static extern int SetWindowLong(IntPtr hWnd, GWL nIndex, WindowStylesEx dwNewLong);
示例14: _GetWindowLongPtr
private static extern IntPtr _GetWindowLongPtr(HWND hwnd, GWL nIndex);
示例15: GetWindowLong
public static extern WindowStylesEx GetWindowLong(IntPtr hwnd, GWL index);