strCode = document.body.style.zoom="150%";
strLang = javascript;
上面两句简单写写,页面放大150%,

CComPtr<IHTMLDocument2> pHTMLDoc = NULL;
CComPtr<IHTMLWindow2> pHTMLWnd = NULL;

if (!(::IsWindow(m_hWnd)))//!! must do this, for m_hWnd=0xcccc
return;
LPDISPATCH spDisp = GetHtmlDocument();
if( spDisp )
{
if(SUCCEEDED(spDisp->QueryInterface(IID_IHTMLDocument2,(void**)&pHTMLDoc)))
{
if(SUCCEEDED(pHTMLDoc->get_parentWindow( &pHTMLWnd )))
{
CComBSTR bstrCode = strCode.AllocSysString();
CComBSTR bstrLang = strLang.AllocSysString();
VARIANT vRet;
vRet.vt = VT_BOOL;
m_bRClick = RC_NOT_FILTER;
BOOL bRet = SUCCEEDED(pHTMLWnd->execScript(bstrCode,bstrLang,&vRet));
//SysFreeString(bstrCode);   
//SysFreeString(bstrLang);  
m_bRClick = 0;
}
}
spDisp->Release();
}但执行后有些网站缩放效果达到,但比如新浪,土豆并不是所有页面元素都放大,谢谢大侠帮忙!