def set_translation(handle, pos):
current = get_win_info(handle)
err = ctypes.windll.user32.MoveWindow(
handle,
ctypes.c_int(pos[0]),
ctypes.c_int(pos[1]),
ctypes.c_int(current.width),
ctypes.c_int(current.height),
ctypes.c_bool(False),
)
# Returns 0 on failure
# https://msdn.microsoft.com/en-us/library/ms633534(VS.85).aspx
if err == ctypes.c_bool(0):
raise ctypes.WinError()
评论列表
文章目录