TWidgetSet.GetWindowLong function
Returns the attributes of a window.
Declaration
function GetWindowLong(Handle: hwnd; int: Integer): PtrInt; virtualArguments
Handle | The window handle. |
int | Offset of the attribute. |
Function result
The attribute.
Description
The following attributes are defined:
- GWL_EXSTYLE
- extended window style flags. See CreateWindowEx.
- GWL_STYLE
- window style flags.
- GWL_WNDPROC
- the window procedure (address or handle). See CallWindowProc.
- GWL_HINSTANCE
- handle of the application instance.
- GWL_HWNDPARENT
- handle of the parent window.
- GWL_ID
- the identifier of the window.
- GWL_USERDATA
- user data associated with the window.
The following attributes are also available when the window is a dialog box:
- DWL_DLGPROC
- the dialog box procedure (address or handle).
- DWL_MSGRESULT
- the return value of a message processed in the dialog box procedure.
- DWL_USER
- extra application information.
GWL_USERDATA and DWL_USER are the base offsets of user added attributes. The second user attribute can be access with an additional offset of 4, and so on.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
