首页 > 编程资源分享区 > C/C++源代码共享 > 如何激活和关闭IE浏览器
2006
08-24

如何激活和关闭IE浏览器

//激活并打开IE
void lounchIE()
{
HWND h=FindWindowEx(NULL, NULL, NULL, “Microsoft Internet Explorer”);
ShellExecute(h, “open”, “http://www.pcvc.net”, NULL,NULL,SW_SHOWNORMAL);
}

//关闭IE及其它应用程序
void CloseIE()
{
int app = BSM_APPLICATIONS;
unsigned long bsm_app = (unsigned long)app;
BroadcastSystemMessage(BSF_POSTMESSAGE, &bsm_app, WM_CLOSE, NULL, NULL);
}


留下一个回复