GetWindowLong
GetWindowLong is a Windows API function in the user32.dll that retrieves a value associated with a specified window. It returns a LONG value based on the window handle (HWND) and an index (nIndex), which identifies the type of data to retrieve. The data can include a pointer or handle stored with the window, such as the window procedure, the instance handle, or values stored in the window’s extra memory.
Common indices used with GetWindowLong include GWL_WNDPROC (window procedure pointer), GWL_HINSTANCE (instance handle), GWL_STYLE and GWL_EXSTYLE
64-bit considerations and modern usage: On 64-bit Windows, pointers and handles are 64 bits, so GetWindowLong
Both GetWindowLong and GetWindowLongPtr have ANSI and Unicode variants (GetWindowLongA/W and their GetWindowLongPtr counterparts). In 64-bit