Functions and Directives

Function GetWindowRestorePlacement() Foundation

Gets the position and dimension a window restores to.

Syntax
GetWindowRestorePlacement( <oWindow>|<nHwnd>, @<aPos>, @<aSize> ) -> lSuccess
Parameters
<oWindow>
The window object to determine the placement of. This must be an instance of the XbpDialog(), XbpCrt()or a derived class.
<nHwnd>
Instead of a window object, a window handle used with the Win32 API can be passed in the <nHwnd> parameter. This must be the handle of a top-level window. Passing a child window in <nHwnd> is not supported.
<aPos>
The restore position. The function assigns an array with the restored window's x and y position to this parameter. <aPos> must be passed by reference.
<aSize>
The restore dimension. The function assigns an array with the restored window's width and the height to this parameter. <aSize> must be passed by reference.
Return

The function returns .T. (true) if the restore placement was retrieved successfully otherwise .F. (false).

Description

The function GetWindowRestorePlacement() returns the restored position and dimension of a window. If the window passed in <oWindow> is currently minimized or maximized, GetWindowRestorePlacement() can be used to determine the position and the dimension of the window if it is restored either by the user or via :setFrameState(XBPDLG_FRAMESTAT_NORMALIZED).

If the window is currently normalized, the function GetWindowRestorePlacement() returns the same information as the methods :currentPos() and :currentSize().

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.