[Overview][Types][Procedures and functions][Variables][Index] | Reference for unit 'LCLIntf' (#lcl)

# SetWindowRgn

Defines the visible region of a window or control.

## Declaration

Source position: winapih.inc line 271

`function SetWindowRgn(`
`hWnd: HWND;`
`hRgn: HRGN;`
`bRedraw: Boolean`
`):LongInt;`

## Description

This function sets the visible region of a window or control. It's parameters are:

hWnd
  The handle of the window or control
hRgn
  The handle to the region which contains the visible section of the window or control
bRedraw
  True if the control or window should be repainted following the call of this function, False otherwise. See also the wiki documentation: Creating a Non-Rectangular Window or Control

## See also

TWinControl.SetShape |  | Specifies the non-rectangular shape of the widget.
LCLIntf.CreateRectRgn |  | Creates a rectangular region.