void AdjustWindowRect(lprc, dwStyle, fMenu) | |||||
RECT FAR* lprc; | /* address of client-rectangle structure | */ | |||
DWORD dwStyle; | /* window styles, */ | ||||
BOOL fMenu; | /* menu-present flag, */ |
The AdjustWindowRect function computes the required size of the window rectangle based on the desired client-rectangle size. The window rectangle can then be passed to the CreateWindow 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.
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.
AdjustWindowRect 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 AdjustWindowRect. This function also does not take the extra rows into account when a menu bar wraps to two or more rows.