开发者

Internet Explorer Events

I write the BHO (using VC++ with ATL) for IE where I need to catch the IE events from Address Bar, History, Bookmarks. For example, if the user has typed URL in Address 开发者_如何学PythonBar, then BHO has to show me that URL was entered from Address Bar.

Is it possible?

Any ideas?


Something likes this:

STDMETHODIMP CBlogUrlSnaggerAddIn2::Exec(
    const GUID *pguidCmdGroup, DWORD nCmdID,
    DWORD nCmdExecOpt, VARIANTARG *pvaIn, VARIANTARG *pvaOut)
{  
    BSTR locationUrl;  
    BSTR locationName;

    m_spWebBrowser->get_LocationURL(&locationUrl);
    m_spWebBrowser->get_LocationName(&locationName);

    MessageBox(NULL, locationUrl, locationName, 0);

    ::SysFreeString(locationUrl);
    ::SysFreeString(locationName);

    return S_OK;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜