GetWindowPlacement

3.1

  BOOL GetWindowPlacement(hwnd, lpwndpl)    
  HWND hwnd; /* handle of window, */  
  WINDOWPLACEMENT FAR* lpwndpl; /* address of structure for position data */

The GetWindowPlacement function retrieves the show state and the normal (restored), minimized, and maximized positions of a window.

Parameters

hwnd

Identifies the window.

lpwndpl

Points to the WINDOWPLACEMENT structure that receives the show state and position information. The WINDOWPLACEMENT structure has the following form:

typedef struct tagWINDOWPLACEMENT {     /* wndpl */
    UINT  length;
    UINT  flags;
    UINT  showCmd;
    POINT ptMinPosition;
    POINT ptMaxPosition;
    RECT  rcNormalPosition;
} WINDOWPLACEMENT;

For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.

Return Value

The return value is nonzero if the function is successful. Otherwise, it is zero.

See Also

SetWindowPlacement