我正在尝试让一些更有趣的Windows Aero效果在Python中运行。在
dwmextendenframeintoclientarea功能可用于将Aero glass扩展到客户区。它需要一个窗口句柄和一个指向页边距结构的指针。我已经知道如何用Python获得窗口的句柄;但是,我不知道如何创建margins结构。在
以下是我目前所掌握的情况:
import Tkinter as tk
import string
import ctypes
root = tk.Tk()
handle = string.atoi(root.wm_frame(), 0)
dwm = ctypes.windll.dwmapi
# needs pointertomarginsstruct
dwm.DwmExtendFrameIntoClientArea(handel, pointertomarginsstruct)
root.mainloop()
我没有运行Win7来测试这一点,但尝试用ctypes定义结构:
相关问题 更多 >
编程相关推荐