User32GetWindowLong(HandleRef, WindowLongValues) Method
Note: This API is now obsolete.
Retrieves information about the specified window.
The function also retrieves the 32-bit (
DWORD) value at the specified offset into the extra window memory.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
[ObsoleteAttribute("Call GetWindowLongPtr instead.", false)]
public static uint GetWindowLong(
HandleRef hWnd,
WindowLongValues flags
)
<DllImportAttribute("User32.dll", SetLastError := true>]
<ObsoleteAttribute("Call GetWindowLongPtr instead.", false)>
Public Shared Function GetWindowLong (
hWnd As HandleRef,
flags As WindowLongValues
) As UInteger
Dim hWnd As HandleRef
Dim flags As WindowLongValues
Dim returnValue As UInteger
returnValue = User32.GetWindowLong(hWnd,
flags)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
[ObsoleteAttribute(L"Call GetWindowLongPtr instead.", false)]
static unsigned int GetWindowLong(
HandleRef hWnd,
WindowLongValues flags
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
[<ObsoleteAttribute("Call GetWindowLongPtr instead.", false)>]
static member GetWindowLong :
hWnd : HandleRef *
flags : WindowLongValues -> uint32
No code example is currently available or this language may not be supported.
- hWnd HandleRef
-
A handle to the window and, indirectly, the class to which the window belongs.
- flags WindowLongValues
-
The zero-based offset to the value to be retrieved.
Valid values are in the range zero through the number of bytes of extra window memory,
minus the size of an integer.
UInt32
If the function succeeds, the return value is the requested value.
If the function fails, the return value is zero.
If
SetWindowLong(IntPtr, WindowLongValues, UInt32) has not been called previously,
GetWindowLong(IntPtr, WindowLongValues) returns zero for values in the extra window or class memory.
To get extended error information, call
GetLastWin32Error.