Share via


GweBypassCoredllThunk_t::GetWindowDC_I

This method retrieves the device context for the entire window, including title bar, menus, and scroll bars.

static HDC WINAPI GetWindowDC_I(
  HWND hwndThis
);

Parameters

  • hwndThis
    [in] Handle to the window with a device context that is to be retrieved. If this value is NULL, GweBypassCoredllThunk_t::GetWindowDC_I retrieves the device context for the entire screen.

Return Values

The handle of a device context for the specified window indicates success. NULL indicates an error or an invalid hWnd parameter. To get extended error information, call GetLastError.

Remarks

This method is an internal version of the GetWindowDC function.

GweBypassCoredllThunk_t::GetWindowDC_I is intended for special painting effects within a the nonclient area of a window. Painting in nonclient areas of any window is not recommended.

The GetSystemMetrics function can be used to retrieve the dimensions of various parts of the nonclient area, such as the title bar, menu, and scroll bars.

The GweBypassCoredllThunk_t::GetDC_I method can be used to retrieve a device context for the entire screen.

After painting is complete, the GweBypassCoredllThunk_t::ReleaseDC_I method must be called to release the device context. Not releasing the window device context has serious effects on painting requested by applications.

Requirements

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

See Also

GetSystemMetrics | GetWindowDC | GweBypassCoredllThunk_t::BeginPaint_I | GweBypassCoredllThunk_t::GetDC_I | GweBypassCoredllThunk_t::ReleaseDC_I

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.