Creating Shaped Windows

This code sample shows how to create shaped windows using the SetWindowRegion and CreatePolygonRgn WinAPI calls.

Screen-shot

The code builds up an array of the Windows POINTAPI type to define the points of the shape (in this case a Christmas Tree), a Windows region is created using the CreatePolygonRgn call and then applied to the main window using the SetWindowRgn call.

Download zipped project file (5k)

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read