Hello, I'm having some trouble working with window 'regions'. I need to initialize some memory for the region and work with it.
I have copied my best approach so far, but I know I don't know what I'm doing when it comes to the 'Buffer' field in RGNDATA. MSDN describes what HRGN points to (a RGNDATA struct) as: typedef struct _RGNDATA { RGNDATAHEADER rdh; char Buffer[1]; } RGNDATA, *PRGNDATA; *Buffer* Specifies an arbitrary-size buffer that contains the *RECT*structures that make up the region.How do I create an arbitrary-size buffer and initialize it? That doesn't really make a lot of sense to me. DWORD = c_ulong class RECT(Structure): _fields_ = [('left', c_long), ('top', c_long), ('right', c_long), ('bottom', c_long)] class RGNDATAHEADER(Structure): _fields_ = [('dwSize', DWORD), ('iType', DWORD), ('nCount', DWORD), ('nRgnSize', DWORD), ('rcBound', RECT)] class RGNDATA(Structure): _fields_ = [('rdh', RGNDATAHEADER), ('Buffer', c_void_p)] HRGN = POINTER(RGNDATA) Specifically I am looking to use SetWindowRgn, CreateRoundRectRgn, CreatePolygonRgn, and possibly modify the RGNDATA structure directly if possible. -- Henry
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32