How can I catch Click-Event of button on IExplorer?

  • Thread starter Thread starter keandi
  • Start date Start date
K

keandi

How can I catch Click-Event of button on IExplorer?

Hi.

I have an ATL com object.(a.dll)
a.dll is a BHO object to catch events of WebBrowser.

And a.dll has next code (in .rgs)

//------------------------------------------------------------------------------------------------------------------
HKLM
{
Software
{
Microsoft
{
'Internet Explorer'
{
Extensions
{
ForceRemove {CABDAEBBD-97D7-49f4-8217-30754ACBB16D} = s 'My Button'
{
val ClsidExtension = s '{90CB25FC-32CD-4956-91DD-D96ABB97CC09}'
val ButtonText = s 'My Button'
val CLSID = s '{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}.'
val 'Default Visible' = s 'Yes'
val HotIcon = s '%MODULE%,201'
val Icon = s '%MODULE%,201'
val MenuStatusBar = s 'My Button'
val MenuText = s 'My Button'
}
}
}
}
}
}

//------------------------------------------------------------------------------------------------------------------

I can see the icon of button.
But I don't know how I catch Click-Event the button.

Please Help Me~!
 
Hi Keandi,

Inside your dll entry point (Main?) use the GetForegroundWindow api to get
the hwnd of the top window which will be your browser window. Then loop
through your Internet Explorer windows to find the window matching the hwnd
of the Foreground window, then you can set your browser object to the
Internet Explorer window that matches the hwnd.

IE with tabbed browsing (IE7 and the MSN search toolbar with tabbed
browsing) break this technique though and you will have to find the active
IEFrame window to find the active tab window and then the active Internet
Explorer_Server object which you can set to your browser object and sink its
events and properties.

Regards.
 
Back
Top