Example #1
0
 def _client_to_window_pos(self, x, y):
     rect = RECT()
     rect.left = x
     rect.top = y
     _user32.AdjustWindowRectEx(byref(rect), self._ws_style, False,
                                self._ex_ws_style)
     return rect.left, rect.top
Example #2
0
 def _client_to_window_size(self, width, height):
     rect = RECT()
     rect.left = 0
     rect.top = 0
     rect.right = width
     rect.bottom = height
     _user32.AdjustWindowRectEx(byref(rect), self._ws_style, False,
                                self._ex_ws_style)
     return rect.right - rect.left, rect.bottom - rect.top