2.1.25.71 SetWindowLong


Description

The SetWindowLong function 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

Syntax

DWORD SetWindowLong( HWND hWnd, int nIndex, DWORD dwNewLong )

Parameters

hWnd
[input] Handle to the window and, indirectly, the class to which the window belongs.
nIndex
[input] Specifies 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 4
dwNewLong
[input] Specifies the replacement value.

Return

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.

Examples

Remark

Certain window data is cached, so changes you make using SetWindowLong will not take effect until you call the SetWindowPos function. Specifically, if you change any of the frame styles, you must call SetWindowPos with the SWP_FRAMECHANGED flag for the cache to be updated properly.

See Also

GetWindowLong

Header to Include

origin.h

Reference