IsWindowArranged function (winuser.h)

Important

Some information relates to a prerelease product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Determines whether a window is arranged.

Syntax

BOOL IsWindowArranged(
  HWND hwnd
);

Parameters

hwnd

Type: HWND

A handle to the window to be tested.

Return value

Type: BOOL

A nonzero value if the window is arranged; otherwise, zero.

Remarks

Tip

At this time, this function does not have an associated header file or library file. Your application can call LoadLibrary with the DLL name (User32.dll) to obtain a module handle. It can then call GetProcAddress with the module handle and the name of this function to get the function address.

A snapped window (see Snap your windows) is considered to be arranged. You should treat arranged as a window state similar to maximized. Arranged, maximized, and minimized are mutually exclusive states. An arranged window can be restored to its original size and position. Restoring a window from minimized can make a window arranged if the window was arranged before it was minimized. When calling GetWindowPlacement, keep in mind that the showCmd member on the returned WINDOWPLACEMENT can have a value of SW_SHOWNORMAL even if the window is arranged.

Example

// Check whether the window is in the restored state.
BOOL IsRestored(HWND hwnd)
{
  if (IsIconic(hwnd) || IsZoomed(hwnd) || IsWindowArranged(hwnd))
  {
    return false;
  }
  return true;
}

Requirements

Requirement Value
Minimum supported client Windows 10, version 1903
Header winuser.h
Library User32.lib
DLL User32.dll

See also