def window__border_rectangle(hwnd):
"""
The outer border size and position of the window
:param hwnd:
:return: a dict with the keys 'x', 'y', 'width', 'height',
'left', 'right', 'top', 'bottom'
"""
rect = wintypes.RECT()
res = windll.user32.GetWindowRect(hwnd, byref(rect))
if res == 0:
raise WinError()
return _rect_to_dict(rect)
评论列表
文章目录