开发者

Internet Explorer Events

开发者 https://www.devze.com 2023-03-22 10:31 出处:网络
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,

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

精彩评论

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