在VC对话框中嵌入了Web Browser,如何实现打开网页的放大和缩小呢?请教高手。

解决方案 »

  1.   

    OLECMDID_OPTICAL_ZOOM
    http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/e542c4e6-acb6-44d4-b742-beab5528ac74
      

  2.   

    这个简单
    HRESULT CBrowserView::Zoom(float fZoom)
    {//////////
    CComPtr<IHTMLDocument2> pDoc = (IHTMLDocument2*)this->GetHtmlDocument();//获取htmlDocument接口
    //if(pDoc) return "";
    ASSERT(pDoc);
    CComPtr<IHTMLElement> pElem;
    pDoc->get_body(&pElem);//获取body对象接口
    //if(pElem) return "";
    ASSERT(pElem);
    CComPtr<IHTMLStyle> pStyle;
    pElem->get_style(&pStyle);//获取body的style接口CString str;
    str.Format(_T("zoom:%f;"), fZoom);
    return pStyle->put_cssText(str.AllocSysString());}
      

  3.   

    我想问一下在MFC中如何实现图片的放大与缩小?