Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function retrieves the coordinates of the smallest rectangle that completely encloses the update region of the specified window in client coordinates. If there is no update region, GetUpdateRectretrieves an empty rectangle; it sets all coordinates to zero.
BOOL GetUpdateRect( HWND hWnd , LPRECT lpRect , BOOL bErase );
Parameters
An application can set this parameter to NULL to determine whether an update region exists for the window. If this parameter is NULL, GetUpdateRectreturns nonzero if an update region exists, and zero if one does not. This provides a simple and efficient means of determining whether a WM_PAINT message resulted from an invalid area.
Return Values
Nonzero indicates that the update region is not empty. Zero indicates that there is no update region.
To get extended error information, call GetLastError.
Remarks
The update rectangle retrieved by the BeginPaintfunction is identical to that retrieved by GetUpdateRect.
BeginPaintautomatically validates the update region, so any call to GetUpdateRectmade immediately after the call to BeginPaintretrieves an empty update region.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winuser.h | Coredll.lib, Winmgr.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
BeginPaint, GetLastError, GetUpdateRgn, InvalidateRect, UpdateWindow, ValidateRect, RECT