User32GetUpdateRect(IntPtr, NativeRectangle, Boolean) Method
Retrieves the coordinates of the smallest rectangle that completely encloses the update region of the specified window.
GetUpdateRect(IntPtr, NativeRectangle, Boolean) retrieves the rectangle in logical coordinates.
If there is no update region,
GetUpdateRect(IntPtr, NativeRectangle, Boolean) retrieves an empty rectangle (sets all coordinates to zero).
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static bool GetUpdateRect(
IntPtr hWnd,
ref NativeRectangle refRect,
bool erase
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function GetUpdateRect (
hWnd As IntPtr,
ByRef refRect As NativeRectangle,
erase As Boolean
) As Boolean
Dim hWnd As IntPtr
Dim refRect As NativeRectangle
Dim erase As Boolean
Dim returnValue As Boolean
returnValue = User32.GetUpdateRect(hWnd,
refRect, erase)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static bool GetUpdateRect(
IntPtr hWnd,
NativeRectangle% refRect,
bool erase
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member GetUpdateRect :
hWnd : IntPtr *
refRect : NativeRectangle byref *
erase : bool -> bool
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
A handle to the window whose update region is to be retrieved.
- refRect NativeRectangle
-
A NativeRectangle that receives the coordinates, in device units, of the enclosing rectangle.
An application can set this parameter to
to determine whether an update region exists for the window.
If this parameter is ,
GetUpdateRect(IntPtr, NativeRectangle, Boolean) returns 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.
- erase Boolean
[Missing <param name="erase"/> documentation for "M:DevCase.Win32.NativeMethods.User32.GetUpdateRect(System.IntPtr,DevCase.Win32.Structures.NativeRectangle@,System.Boolean)"]
Boolean
If the update region is not empty, the return value is
.
If there is no update region, the return value is
.
To get extended error information, call
GetLastWin32Error.