WINDOW GET USER statement

Purpose | Manipulate a Window in the program, which may include setting or retrieving data. The target window may be of any class, including a CONTROL or Dialog.

Syntax

WINDOW GET HANDLE hWin, ID& TO DataVar&

WINDOW GET ID hWin TO DataVar&

WINDOW GET PARENT hWin TO DataVar&

WINDOW GET STYLE hWin TO DataVar&

WINDOW GET STYLEX hWin TO DataVar&

WINDOW GET USER hWin TO DataVar&

hWin | Handle of the Window to be used.
DataVar& | A long integer variable to which result data is assigned.

Remarks

The WINDOW statement may be used with any type of window in your program, including a Control or Dialog. Generally speaking, the window to be manipulated or tested is identified by its handle (hWin), which is often obtained at the time it is created. However, since a control is usually accessed by a "Parent / ID" combination, you must use WINDOW GET HANDLE or CONTROL HANDLE to retrieve its handle for this purpose. If the operation fails, the value zero (0) is assigned to the result variable.

WINDOW GET HANDLE hWin, ID& TO DataVar&

This statement retrieves the handle of a Window, translating from the parent handle and the specific integral control ID given at the time it was created. hWin is the handle of the parent, ID& is the control ID, and DataVar& represents the variable which receives the desired window handle.

WINDOW GET ID

hWin To DataVar&

The integral ID of the window hWin is retrieved and assigned to the variable designated by DataVar&. Generally, only a CONTROL will have an ID, so windows of other classes will normally return the value zero.

WINDOW GET PARENT hWin To DataVar&

The handle of the parent is retrieved and assigned to the variable designated by DataVar&.

WINDOW GET STYLE hWin TO DataVar&

The window style value of the window specified by the handle hWin is retrieved and assigned to the variable designated by DataVar&.

WINDOW GET STYLEX hWin TO DataVar&

The extended window style value of the window specified by the handle hWin is retrieved and assigned to the variable designated by DataVar&.

WINDOW GET USER hWin TO DataVar&

The 32-bit user data value associated with the window specified by the handle hWin is retrieved and assigned to the variable designated by DataVar&. This particular user data value is associated with every window in your program, and is maintained by the Windows operating system. It is separate and apart from user data maintained by DDT for each dialog and control created with DDT.

See also | CONTROL HANDLE, WINDOW SET