programming:windows:GetWindowLongWhat links here?
The GetWindowLong function retrieves information about the specified window. The function also retrieves the 32-bit (long) value at the specified offset into the extra window memory.

If you are retrieving a pointer or a handle, this function has been superseded by the [GetWindowLongPtr] function. (Pointers and handles are 32 bits on 32-bit Microsoft Windows and 64 bits on 64-bit Windows.) To write code that is compatible with both 32-bit and 64-bit versions of Windows, use [GetWindowLongPtr].

Syntax
    LONG GetWindowLong(
        HWND hWnd,
        int nIndex
    );


Parameters

Return Value
If the function succeeds, the return value is the requested 32-bit value.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

If SetWindowLong has not been called previously, GetWindowLong returns zero for values in the extra window or class memory.

Remarks
Reserve extra window memory by specifying a nonzero value in the cbWndExtra member of the WNDCLASSEX structure used with the RegisterClassEx function.

Windows 95/98/Me: GetWindowLongW is supported by the Microsoft Layer for Unicode (MSLU). GetWindowLongA is also supported to provide more consistent behavior across all Windows operating systems. To use these versions, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .

Function Information


See also programming:windows:window value offsets
programming:windows:GetWindowLong
filename:programming:windows:GetWindowLong
filename:programming%3Awindows%3AGetWindowLong
last edit:March 26 2010 17:53:22 (5154 days ago)
ct = 1714990747.000000 = May 06 2024 06:19:07
ft = 1269640402.000000 = March 26 2010 17:53:22
dt = 445350345.000000