HWND OpenWindows(HWND hwnd)
{
LPCTSTR open = L"open"; //set config
//ShellExecute(hwnd, open, L"iexplore.exe", L"https://hao.360.cn/?a1004", NULL, SW_SHOWNORMAL);
//ShellExecute(hwnd, open, L"http://www.2cto.com/kf/201307/229105.html",NULL, NULL, SW_SHOWNORMAL);
ShellExecute(hwnd, open,L"C:\\Program Files\\Internet Explorer\\iexplore.exe", NULL, NULL, SW_SHOWMAXIMIZED );//open the first ie explore.
Sleep(500);
HWND hwexp1 = FindWindow(L"IEFrame",NULL); //get the hwnd
for(int i=0;i<5;i++)
ShellExecute(hwexp1, open, L"https://hao.360.cn/?a1004", NULL, NULL, SW_SHOWMAXIMIZED);//get 5 page from the first ie windows.
Sleep(1500);
ShellExecute(hwnd, open,L"C:\\Program Files\\Internet Explorer\\iexplore.exe", NULL, NULL, SW_SHOWMAXIMIZED );//open the 2nd ie explore.
Sleep(500);
HWND hwexp2 = FindWindow(L"IEFrame",NULL);
for(int i=0;i<5;i++)
ShellExecute(hwexp2, open, L"https://hao.360.cn/?a1004", NULL, NULL, SW_SHOWMAXIMIZED);//get 5 page from the 2nd ie windows.
return hwexp2;
}
{
LPCTSTR open = L"open"; //set config
//ShellExecute(hwnd, open, L"iexplore.exe", L"https://hao.360.cn/?a1004", NULL, SW_SHOWNORMAL);
//ShellExecute(hwnd, open, L"http://www.2cto.com/kf/201307/229105.html",NULL, NULL, SW_SHOWNORMAL);
ShellExecute(hwnd, open,L"C:\\Program Files\\Internet Explorer\\iexplore.exe", NULL, NULL, SW_SHOWMAXIMIZED );//open the first ie explore.
Sleep(500);
HWND hwexp1 = FindWindow(L"IEFrame",NULL); //get the hwnd
for(int i=0;i<5;i++)
ShellExecute(hwexp1, open, L"https://hao.360.cn/?a1004", NULL, NULL, SW_SHOWMAXIMIZED);//get 5 page from the first ie windows.
Sleep(1500);
ShellExecute(hwnd, open,L"C:\\Program Files\\Internet Explorer\\iexplore.exe", NULL, NULL, SW_SHOWMAXIMIZED );//open the 2nd ie explore.
Sleep(500);
HWND hwexp2 = FindWindow(L"IEFrame",NULL);
for(int i=0;i<5;i++)
ShellExecute(hwexp2, open, L"https://hao.360.cn/?a1004", NULL, NULL, SW_SHOWMAXIMIZED);//get 5 page from the 2nd ie windows.
return hwexp2;
}