GweBypassCoredllThunk_t::BeginPaint_I

This method prepares the specified window for painting and fills a PAINTSTRUCT structure with information about the painting.

static HDC WINAPI BeginPaint_I(
  HWND hwndThis,
  PPAINTSTRUCT pps
);

Parameters

  • hwndThis
    [in] Handle to the window to be repainted.
  • pps
    [out] Long pointer to the PAINTSTRUCT structure that receives painting information.

Return Values

The handle to a display device context for the specified window indicates success. NULL indicates that no display device context is available.

To get extended error information, call GetLastError.

Remarks

This method is an internal version of the BeginPaint function.

The GweBypassCoredllThunk_t::BeginPaint_I method automatically sets the clipping region of the device context to exclude any area outside the update region. The update region is set by the GweBypassCoredllThunk_t::InvalidateRect_I method and by the system after sizing, moving, creating, scrolling, or any other operation that affects the client area. If the update region is marked for erasing, GweBypassCoredllThunk_t::BeginPaint_I sends a WM_ERASEBKGND message to the window.

An application should not call GweBypassCoredllThunk_t::BeginPaint_I except in response to a WM_PAINT message. Each call to GweBypassCoredllThunk_t::BeginPaint_I must have a corresponding call to the GweBypassCoredllThunk_t::EndPaint_I method.

If the caret is in the area to be painted, GweBypassCoredllThunk_t::BeginPaint_I automatically hides the caret to prevent it from being erased.

If the class for the window has a background brush, GweBypassCoredllThunk_t::BeginPaint_I uses that brush to erase the background of the update region before returning.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: GweBypassCoredllThunk.hpp.

See Also

BeginPaint | GweBypassCoredllThunk_t::EndPaint_I | GweBypassCoredllThunk_t::InvalidateRect_I | GweBypassCoredllThunk_t::ValidateRect_I | WM_ERASEBKGND | WM_PAINT | PAINTSTRUCT

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.