description | ms.assetid | title | ms.topic | ms.date |
---|---|---|---|---|
An application creates a region by calling a function associated with a specific shape. The following table shows the function(s) associated with each of the standard shapes. |
e94ae371-8365-4e42-ac8c-04c3928fcffb |
Region Creation and Selection |
article |
05/31/2018 |
An application creates a region by calling a function associated with a specific shape. The following table shows the function(s) associated with each of the standard shapes.
Shape | Function |
---|---|
Rectangular region | CreateRectRgn, CreateRectRgnIndirect, SetRectRgn |
Rectangular region with rounded corners | CreateRoundRectRgn |
Elliptical region | CreateEllipticRgn, CreateEllipticRgnIndirect |
Polygonal region | CreatePolygonRgn, CreatePolyPolygonRgn |
Each region creation function returns a handle that identifies the new region. An application can use this handle to select the region into a device context by calling the SelectObject function and supplying this handle as the second argument. After a region is selected into a device context, the application can perform various operations on it.