This function is useful for implementing an incremental update scheme as an alternative to the WinBeginPaint and WinEndPaint functions.