HWND appwnd;

    appwnd = (HWND)this->winId();

QString ClassName("Qt5QWindowIcon");
    QString AppName = QStringLiteral("GG");

    LPCWSTR app = reinterpret_cast<LPCWSTR>(ClassName.data());
    LPCWSTR appCaption = reinterpret_cast<LPCWSTR>(AppName.data());

    appwnd = ::FindWindow(app, appCaption);


    HWND hwnd;
    hwnd=(HWND)myWidget->winId();


qDebug() << "----------创建预览窗口-------------"<<hwnd;
    qDebug() << "----------创建预览窗口-------------"<<(unsigned long)hwnd;

    qDebug() << "----------创建预览窗口-------------"<<myWidget->winId();

    qDebug() << "----------创建预览窗口-------------"<<this->winId();
 
posted on 2020-05-21 14:21  刘达人186  阅读(1292)  评论(0编辑  收藏  举报