|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| -
| Header File
| winuser.h
| Unicode
| No
| Platform Notes
| None
|
|
|
WM_NCCALCSIZE
The WM_NCCALCSIZE message is sent when the size and position of a window's
client area must be calculated. By processing this message, an application can
control the content of the window's client area when the size or position of the
window changes.
WM_NCCALCSIZE
fCalcValidRects = (BOOL) wParam; // valid area flag
lpncsp = (LPNCCALCSIZE_PARAMS) lParam; // points to size calculation data
or
lpncsp = (LPRECT) lParam; // points to new window coordinates
Parameters
fCalcValidRects
Value of wParam. A Boolean value that, if TRUE, specifies that the application should
indicate which part of the client area contains valid information. The operating
system copies the valid information to the specified area within the new client
area. Also, if this parameter is TRUE, lParam points to an NCCALCSIZE_PARAMS structure.
If this parameter is FALSE, the application does not need to indicate the
valid part of the client area. Also, if this parameter is FALSE, lParam points to a RECT structure.
lpncsp
Value of lParam.
If wParam is TRUE, lParam points to an NCCALCSIZE_PARAMS structure that contains information an application can use to calculate the
new size and position of the client rectangle.
If wParam is FALSE, lParam points to a RECT structure that contains the new coordinates of the window that has been moved
or resized. This is equivalent to rgrc[0] of an NCCALCSIZE_PARAMS structure.
Return Values
If the fCalcValidRects parameter is FALSE, the application should return zero.
If fCalcValidRects is TRUE, the application can return zero or a valid combination of the
following values:
WVR_ALIGNTOP, WVR_ALIGNLEFT, WVR_ALIGNBOTTOM, WVR_ALIGNRIGHT
|
|
| These values, used in combination, specify that the client area of the window
is to be preserved and aligned appropriately relative to the new position of
the window. For example, to align the client area to the lower-left corner,
return the WVR_ALIGNLEFT and WVR_ALIGNTOP values.
|
| These values, used in combination with any other values, cause the window to
be completely redrawn if the client rectangle changes size horizontally or
vertically. These values are similar to the CS_HREDRAW and CS_VREDRAW class styles.
|
| This value causes the entire window to be redrawn. It is a combination of
WVR_HREDRAW and WVR_VREDRAW values.
|
| This value indicates that, upon return from WM_NCCALCSIZE, the rectangles
specified by the rgrc[1] and rgrc[2] members of the NCCALCSIZE_PARAMS structure contain valid source and destination area rectangles, respectively.
Windows combines these rectangles to calculate the area of the window to be
preserved. Windows copies any part of the window image that is within the source
rectangle and clips the image to the destination rectangle. Both rectangles are
in parent-relative or screen-relative coordinates.
|
| This return value allows an application to implement more elaborate
client-area preservation strategies, such as centering or preserving a subset of the
client area.
|
If fCalcValidRects is TRUE and an application returns zero, the old client area is preserved and
is aligned with the upper-left corner of the new client area.
Default Action
The window may be redrawn, depending on whether the CS_HREDRAW or CS_VREDRAW
class style is specified. This is the default, backward-compatible processing of
this message by the DefWindowProc function (in addition to the usual client rectangle calculation described in
the preceding table).
See Also
DefWindowProc, MoveWindow, SetWindowPos, NCCALCSIZE_PARAMS, RECT
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|