winrt.runtime.interop module

Various functions for interoperating with Win32 and COM.

def initialize_with_window(obj: Object, hwnd: int) -> None: ...

Provide an owner window to a Windows Runtime (WinRT) object used in a desktop application.

Parameters:
  • obj (Object) – A WinRT object that implements IInitializeWithWindow interface.

  • hwnd (int) – The handle of the window to be used as the owner window.

Added in version 3.0.

See also

Microsoft docs