(self, parent=True, console=False)
Get the handle of the currently focused window.
Get the handle of the currently focused window.
Get the handle of the currently focused window .
def __init__(self, parent=True, console=False):
        """Get the handle of the currently focused window."""
        self.hwnd = get_window_handle(parent, console)
        
        process_id = ctypes.c_int()
        ctypes.windll.user32.GetWindowThreadProcessId(self.hwnd, ctypes.byref(process_id))
        self.pid = process_id.value
def __init__ ( self , parent = True , console = False ) : self . hwnd = get_window_handle ( parent , console ) process_id = ctypes . c_int ( ) ctypes . windll . user32 . GetWindowThreadProcessId ( self . hwnd , ctypes . byref ( process_id ) ) self . pid = process_id . value