User32SetWindowLongPtr(IntPtr, WindowLongValues, IntPtr) Method
Changes an attribute of the specified window.
The function also sets a value at the specified offset in 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)]
public static IntPtr SetWindowLongPtr(
IntPtr hWnd,
WindowLongValues value,
IntPtr newValue
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function SetWindowLongPtr (
hWnd As IntPtr,
value As WindowLongValues,
newValue As IntPtr
) As IntPtr
Dim hWnd As IntPtr
Dim value As WindowLongValues
Dim newValue As IntPtr
Dim returnValue As IntPtr
returnValue = User32.SetWindowLongPtr(hWnd,
value, newValue)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static IntPtr SetWindowLongPtr(
IntPtr hWnd,
WindowLongValues value,
IntPtr newValue
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member SetWindowLongPtr :
hWnd : IntPtr *
value : WindowLongValues *
newValue : IntPtr -> IntPtr
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
A handle to the window and, indirectly, the class to which the window belongs.
The SetWindowLongPtr(IntPtr, WindowLongValues, IntPtr) function fails if the process that owns the window specified by the
hWnd parameter is at a higher process privilege in the
UIPI hierarchy than the process the calling thread resides in.
- value WindowLongValues
-
The value to be set.
- newValue IntPtr
-
The replacement value.
IntPtr
If the function succeeds, the return value is the previous value of the specified offset.
If the function fails, the return value is
Zero.
If the previous value is
Zero and the function succeeds, the return value is
Zero.
To get extended error information, call
GetLastWin32Error.