rectWindow = D2D.GetWindowRect(self.hwnd)#窗口大小 rectClient = D2D.GetWindowRect(self.hwnd,True)#客户区大小 titleBarHeight = D2D.DGetSystemMetrics(4)#窗口标题栏高度 borderWidth = (rectWindow.width - rectClient.width)/2#边框宽度 borderHeight = (rectWindow.height - rectClient.height - titleBarHeight)/2#边框高度