首页 > 代码库 > 找多个同名的窗口

找多个同名的窗口

            QString string1 =  "标题";
            HWND hJoin = FindWindow(NULL, string1.toLocal8Bit());//找窗口句柄

            DWORD dwStyle = (DWORD)GetWindowLong(hJoin, GWL_STYLE);
            while(dwStyle == 0x86000000)
            {
                hJoin = FindWindowEx(NULL, hJoin, NULL, string1.toLocal8Bit());
                dwStyle = (DWORD)GetWindowLong(hJoin, GWL_STYLE);
            }

  

找多个同名的窗口