ScreenViewer.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:poeai 作者: nicholastoddsmith 项目源码 文件源码
def WindowDraw(self, rect):
        '''
        Draws a rectangle to the window
        '''
        if self.hwnd is None:
            return
            #raise Exception("HWND is none. HWND not called or invalid window name provided.")
        wDC = win32gui.GetWindowDC(self.hwnd)
        dcObj = win32ui.CreateDCFromHandle(wDC)
        #Set background mode to transparent
        #dcObj.SetBkColor(0x12345)
        #dcObj.SetBkMode(0)
        dcObj.Rectangle(rect)
        # Free Resources
        dcObj.DeleteDC()
        win32gui.ReleaseDC(self.hwnd, wDC)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号