win32gui.SetWindowRgn

SetWindowRgn(hWnd, hRgn, Redraw)

Sets the visible region of a window

Parameters

hWnd : PyHANDLE

Handle to a window

hRgn : PyGdiHANDLE

Handle to region to be set, can be None

Redraw : boolean

Indicates if window should be completely redrawn

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.