Share via


GweBypassCoredllThunk_t::SetWindowRgn_I (Windows Embedded CE 6.0)

1/6/2010

This method sets the window region of a window. The window region determines the area within the window where the system permits drawing. The system does not display any portion of a window that lies outside of the window region.

Syntax

static int WINAPI SetWindowRgn_I(
  HWND hwndThis,
  HRGN hrgn,
  BOOL bRedraw
);

Parameters

  • hwndThis
    [in] Handle to the window whose window region is to be set.
  • hrgn
    [in] Handle to a region. The method sets the window region of the window to this region.

    If hRgn is NULL, the method sets the window region to NULL.

  • bRedraw
    [in] Boolean that specifies whether the system redraws the window after setting the window region. If bRedraw is TRUE, the system does so; otherwise, it does not.

    Typically, you set bRedraw to TRUE if the window is visible.

Return Value

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

This method is an internal version of the SetWindowRgn function.

When this method is called, the system sends the WM_WINDOWPOSCHANGED messages to the window.

The coordinates of the window region for a window are relative to the upper-left corner of the window, not the client area of the window.

After a successful call to GweBypassCoredllThunk_t::SetWindowRgn_I, the system owns the region specified by the region handle hRgn. The system does not make a copy of the region. Therefore, you should not make any further function calls with this region handle. In particular, do not delete this region handle. The system deletes the region handle when it no longer needed.

To obtain the window region of a window, call the GweBypassCoredllThunk_t::GetWindowRgn_I method.

Windows Embedded CE does not accept regions on windows that fit exactly into entire screen or greater dimensions.

Requirements

Header gwebypasscoredllthunk.hpp
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

GweBypassCoredllThunk_t
SetWindowRgn
GweBypassCoredllThunk_t::GetWindowRgn_I