win32gui.SetWindowRgn
SetWindowRgn(hWnd, hRgn, Redraw)
Sets the visible region of a window
Parameters
Comments
On success, the system assumes ownership of the region so you should call the handle's Detach() method to prevent it from being automatically closed.