使用ShellExecute函数打开IE浏览器下的新窗口
来源:互联网 发布:php 单例模式 编辑:程序博客网 时间:2024/06/06 02:01
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;
}
阅读全文
0 0
- 使用ShellExecute函数打开IE浏览器下的新窗口
- IE浏览器不能打开新窗口的解决办法
- VC 使用IE、火狐或默认浏览器打开网页ShellExecute
- VC 使用IE、火狐或默认浏览器打开网页ShellExecute
- 使用你自己的浏览器打开新窗口
- 使用你自己的浏览器打开新窗口
- ShellExecute指定IE浏览器打开网页
- 解决IE浏览器不能够打开新窗口的方法
- IE下防止打开新窗口
- ShellExecute:用默认的浏览器打开网页
- IE不能打开新窗口的解决办法
- 解决IE不能打开新窗口的问题
- IE无法打开新窗口的解决
- IE不能打开新窗口
- 浏览器拦截新窗口打开的问题
- 在阻止打开新窗口的环境下打开一个新窗口
- windows客户端开发--通过ShellExecute函数打开浏览器
- 打开浏览器新窗口
- Android错误之(Android 6.0)Unable to add window android.view.ViewRootImpl$W@d4521e8 -- permission denied
- sql 语句 记录
- 基数排序
- 移动web开发三之头部和底部
- Print Binary Tree问题及解法
- 使用ShellExecute函数打开IE浏览器下的新窗口
- android开发--ProgressBar 颜色/样式的设置
- 3347-数据结构实验之数组三:快速转置
- 进程间通信之messenger
- freemarker基本命令学习
- HDU 3729 I'm Telling the Truth(二分图最大匹配)
- ios百度地图更改罗盘指南针位置
- 测试
- Spring注解@Component、@Repository、@Service、@Controller区别