ValidateRect

2.x

  void ValidateRect(hwnd, lprc)    
  HWND hwnd; /* handle of window, */  
  const RECT FAR* lprc; /* address of structure with validation rect. */

The ValidateRect function validates the client area within the given rectangle by removing the rectangle from the update region of the given window.

Parameters

hwnd

Identifies the window whose update region is to be modified.

lprc

Points to a RECT structure that contains the client coordinates of the rectangle to be removed from the update region. If this parameter is NULL, the entire client area is removed. 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.

Return Value

This function does not return a value.

Comments

The BeginPaint function automatically validates the entire client area. Neither the ValidateRect nor the ValidateRgn function should be called if a portion of the update region needs to be validated before the next WM_PAINT message is generated.

Windows continues to generate WM_PAINT messages until the current update region is validated.

See Also

BeginPaint, InvalidateRect, InvalidateRgn, ValidateRgn