SetWindowLongPtr function user32

Win32Result<int> SetWindowLongPtr(
  1. HWND hWnd,
  2. WINDOW_LONG_PTR_INDEX nIndex,
  3. int dwNewLong
)

Changes an attribute of the specified window.

To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-setwindowlongptrw.

Implementation

Win32Result<int> SetWindowLongPtr(
  HWND hWnd,
  WINDOW_LONG_PTR_INDEX nIndex,
  int dwNewLong,
) {
  final result_ = SetWindowLongPtrW_Wrapper(hWnd, nIndex, dwNewLong);
  return .new(value: result_.value.i64, error: result_.error);
}