void AdjustWindowRectEx(lprc, dwStyle, fMenu, dwExStyle) | |||||
RECT FAR* lprc; | /* address of client-rectangle structure | */ | |||
DWORD dwStyle; | /* window styles, */ | ||||
BOOL fMenu; | /* menu-present flag, */ | ||||
DWORD dwExStyle; | /* extended style, */ |
The AdjustWindowRectEx function computes the required size of the rectangle of a window with extended style based on the desired client-rectangle size. The window rectangle can then be passed to the CreateWindowEx function to create a window whose client area is the desired size.
lprc
Points to a RECT structure that contains the coordinates of the client rectangle. The RECT structure has the following form:
typedef struct tagRECT { /* rc */
int left;
int top;
int right;
int bottom;
} RECT;
For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.
dwStyle
Specifies the window styles of the window whose client rectangle is to be converted.
fMenu
Specifies whether the window has a menu.
dwExStyle
Specifies the extended style of the window being created.
This function does not return a value.
A client rectangle is the smallest rectangle that completely encloses a client area. A window rectangle is the smallest rectangle that completely encloses the window.
AdjustWindowRectEx does not take titles and borders into account when computing the size of the client area. For window styles that include titles and borders, applications must add the title and border sizes after calling AdjustWindowRectEx. This function also does not take the extra rows into account when a menu bar wraps to two or more rows.