Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WM_CALCVALIDRECTS (1.2)
◄Message Group► ◄Overview► ◄Changes► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINMESSAGEMGR
WM_CALCVALIDRECTS
parclWindow = (PRECTL) PVOIDFROMMP(mp1); /* source rectangle */
pswpDest = (PSWP) PVOIDFROMMP(mp2); /* destination window */
The WM_CALCVALIDRECTS message is sent when a window is about to be resized.
This allows the application to specify the coordinates of a rectangle that
will be preserved and to designate where this rectangle will be moved in the
resized window. Areas outside this rectangle will be redrawn.
Parameter Description
────────────────────────────────────────────────────────────────────────────
parclWindow Low and high word of mp1. Points to an array of two RECTL
structures that contain the dimensions of the window before and
after resizing. The first RECTL structure contains the source
rectangle; the second RECTL structure contains the destination
rectangle. The coordinates of the rectangles are relative to
the parent window of the window.
pswpDest Low and high word of mp2. Points to the SWP structure that
contains information about the window after it is resized.
Return Value
If an application processes this message, it can return zero to indicate it
has changed the rectangle itself, CVR_REDRAW if the entire window is to be
redrawn, or a combination of the following values:
Value Meaning
────────────────────────────────────────────────────────────────────────────
CVR_ALIGNBOTTOM Align with the bottom edge of the window.
CVR_ALIGNLEFT Align with the left edge of the window.
CVR_ALIGNRIGHT Align with the right edge of the window.
CVR_ALIGNTOP Align with the top edge of the window.
Comments
The WM_CALCVALIDRECTS message is not sent if a window has the CS_SIZEREDRAW
style because such windows are always completely redrawn when resized.
See Also
WM_ADJUSTWINDOWPOS, RECTL, SWP
♦