win_32_api.py 文件源码

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

项目:tk-photoshopcc 作者: shotgunsoftware 项目源码 文件源码
def qwidget_winid_to_hwnd(winid):
    """
    Convert the winid for a QWidget to an HWND.

    :param int winid: The QWidget winid to convert.

    :returns: Window handle
    """
    # Setup arguments and return types.
    ctypes.pythonapi.PyCObject_AsVoidPtr.restype = ctypes.c_void_p
    ctypes.pythonapi.PyCObject_AsVoidPtr.argtypes = [ctypes.py_object]

    # Convert PyCObject to a void pointer.
    hwnd = ctypes.pythonapi.PyCObject_AsVoidPtr(winid)

    return hwnd
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号