There are a few API functions for creating and modifying window regions, here are a few:

Code:
SetWindowRgn()
CreateRectRgn()
CreateEllipticRgn()
CombineRgn()