User32SetWindowLong(SafeHandle, WindowLongValues, UInt32) Method
Note: This API is now obsolete.
Changes an attribute of the specified window.
The function also sets the 32-bit (
LONG) 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 SetWindowLongPtr instead.", false)]
public static uint SetWindowLong(
SafeHandle hWnd,
WindowLongValues flags,
uint newLong
)
<DllImportAttribute("User32.dll", SetLastError := true>]
<ObsoleteAttribute("Call SetWindowLongPtr instead.", false)>
Public Shared Function SetWindowLong (
hWnd As SafeHandle,
flags As WindowLongValues,
newLong As UInteger
) As UInteger
Dim hWnd As SafeHandle
Dim flags As WindowLongValues
Dim newLong As UInteger
Dim returnValue As UInteger
returnValue = User32.SetWindowLong(hWnd,
flags, newLong)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
[ObsoleteAttribute(L"Call SetWindowLongPtr instead.", false)]
static unsigned int SetWindowLong(
SafeHandle^ hWnd,
WindowLongValues flags,
unsigned int newLong
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
[<ObsoleteAttribute("Call SetWindowLongPtr instead.", false)>]
static member SetWindowLong :
hWnd : SafeHandle *
flags : WindowLongValues *
newLong : uint32 -> uint32
No code example is currently available or this language may not be supported.
- hWnd SafeHandle
-
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 set.
Valid values are in the range zero through the number of bytes of extra window memory,
minus the size of an integer.
- newLong UInt32
-
The replacement value.
UInt32
If the function succeeds, the return value is the previous value of the specified 32-bit integer.
If the function fails, the return value is zero.
If the previous value of the specified 32-bit integer is zero,
and the function succeeds, the return value is zero.
To get extended error information, call
GetLastWin32Error.