CSDN博客

img uuty

启动IE

发表于2004/10/12 21:37:00  843人阅读

分类: 摘抄

这样启动IE,每次都起来:

#include <initguid.h>
#include <exdisp.h>
#include <afxdisp.h>

COleVariant vUrl(" http://www.microsoft.com/& #34;);
VARIANT vDummy={0};  
IWebBrowser2* pWB;
HRESULT hr;

CoInitialize(0);

hr=CoCreateInstance(CLSID_InternetExplorer,0,CLSCTX_SERVER,IID_IWebBrowser2,(LPVOID*)&pWB);
VERIFY(SUCCEEDED(hr));

hr=pWB->put_Visible(VARIANT_TRUE);
hr=pWB->Navigate2((VARIANT*)&vUrl,&vDummy,&vDummy,&vDummy,&vDummy);
阅读全文
0 0

相关文章推荐

img
取 消
img