获得消息的x,y的窗口内坐标(包括边框和titlebar高度

        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#边框高度

 

posted @ 2013-11-16 07:02  fff8965  阅读(457)  评论(0编辑  收藏  举报