Size and Position Functions
After creating a window, an application can set the window's size or position
by calling one of several different functions, including
SetWindowPlacement,
MoveWindow,
SetWindowPos, and
DeferWindowPos.
SetWindowPlacement sets a window's minimized position, maximized position, restored size and
position, and show state. The
MoveWindow and
SetWindowPos functions are similar; both set the size or position of a single application
window. The
SetWindowPos function includes a set of flags that affect the window's show state;
MoveWindow does not include these flags. Use the
BeginDeferWindowPos,
DeferWindowPos, and
EndDeferWindowPos functions to simultaneously set the position of a number of windows,
including the size, position, position in the Z order, and show state.
An application can retrieve the coordinates of a window's bounding rectangle
by using the
GetWindowRect function.
GetWindowRect fills a
RECT structure with the coordinates of the window's upper left and lower right
corners. The coordinates are relative to the upper left corner of the screen, even
for a child window. The
ScreenToClient or
MapWindowPoints function maps the screen coordinates of a child window's bounding rectangle
to coordinates relative to the parent window's client area.
The
GetClientRect function retrieves the coordinates of a window's client area.
GetClientRect fills a
RECT structure with the coordinates of the upper left and lower right corners of
the client area, but the coordinates are relative to the client area itself.
This means the coordinates of a client area's upper left corner are always (0,0),
and the coordinates of the lower right corner are the width and height of the
client area.
The
CascadeWindows function cascades the windows on the desktop or cascades the child windows of
the specified parent window. The
TileWindows function tiles the windows on the desktop or tiles the child windows of the
specified parent window.
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database