The SetWindowRgn function sets the window region of a window. The window region determines the area within the window where the operating system permits drawing. The operating system does not display any portion of a window that lies outside of the window region.
Declare Function SetWindowRgn Lib "user32" Alias "SetWindowRgn" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
|Operating Systems Supported|
|Requires Windows NT 3.5(1) or later; Requires Windows 95 or later|
Handle to the window whose window region is to be set.
Handle to a region. The function sets the window region of the window to this region.
If hRgn is NULL, the function sets the window region to NULL.
Boolean value that specifies whether the operating system redraws the window after setting the window region. If bRedraw is TRUE, the operating system does so; otherwise, it does not.
Typically, you set bRedraw to TRUE if the window is visible.
|If the function succeeds, the return value is nonzero.|
If the function fails, the return value is zero. To get extended error information, call GetLastError.