This code sample shows how to create shaped windows using the SetWindowRegion and CreatePolygonRgn WinAPI calls.
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.