Intercepting/handling simple events in ActiveX_IEHtmlWindow

Hi! Tried emailing Jeff Grimmett, the author of the relevant demo,
directly (using the address in the demo) but it was bounced back
undeliverable--maybe he still lurks here? In any event (NPI), I'm
hoping to learn how to intercept/handle simpler events, e.g., mouse
clicks, than those listed at the reference given in the demo, MSDN
docs for DWebBrowserEvents2, that take place within an
ActiveX_IEHtmlWindow. For example, I want to write an app that reads
and processes a page's source when the user clicks on an otherwise
"inert" object in the page (i.e., one that isn't already associated w/
a link or an internal event handler). (FTR, the only reason why I'm
looking at using ActiveX_IEHtmlWindow is 'cause there doesn't appear
to be an equally "rich" way to embed another browser in a wxWindow--if
that observation is wrong, please correct me because I would rather
use just about any other browser technology that works in Windows and
supports a broad array of image types, e.g., I already tried pointing
the HtmlWindow demo at some pages I want to process as described and
it wasn't able to render those pages' images.) Thanks in advance for
any help.

OlyDLG

Uh, think I may have answered my own question: IEHtmlWindow is derived from wx.Window, so it intercepts/handles simpler events just as that does, of course, yes? Doh, sorry for the noise.

OlyDG

···

On Fri, Nov 11, 2011 at 12:31 AM, OlyDLG d.l.goldsmith@gmail.com wrote:

Hi! Tried emailing Jeff Grimmett, the author of the relevant demo,

directly (using the address in the demo) but it was bounced back

undeliverable–maybe he still lurks here? In any event (NPI), I’m

hoping to learn how to intercept/handle simpler events, e.g., mouse

clicks, than those listed at the reference given in the demo, MSDN

docs for DWebBrowserEvents2, that take place within an

ActiveX_IEHtmlWindow. For example, I want to write an app that reads

and processes a page’s source when the user clicks on an otherwise

“inert” object in the page (i.e., one that isn’t already associated w/

a link or an internal event handler). (FTR, the only reason why I’m

looking at using ActiveX_IEHtmlWindow is 'cause there doesn’t appear

to be an equally “rich” way to embed another browser in a wxWindow–if

that observation is wrong, please correct me because I would rather

use just about any other browser technology that works in Windows and

supports a broad array of image types, e.g., I already tried pointing

the HtmlWindow demo at some pages I want to process as described and

it wasn’t able to render those pages’ images.) Thanks in advance for

any help.

OlyDLG


From “A Letter From The Future” in “Peak Everything” by Richard Heinberg:
“By the time I was an older teenager, a certain…attitude was developing among the young people…a feeling of utter contempt for anyone over a certain age–maybe 30 or 40. The adults had consumed so many resources, and now there were none left for their own children…when those adults were younger, they [were] just doing what everybody else was doing…they figured it was normal to cut down ancient forests for…phone books, pump every last gallon of oil to power their SUV’s…[but] for…my generation all that was just a dim memory…We [grew up] living in darkness, with shortages of food and water, with riots in the streets, with people begging on street corners…for us, the adults were the enemy.”
Want to really understand what’s really going on? Read “Peak Everything.”

Uh, think I may have answered my own question: IEHtmlWindow is derived
from wx.Window, so it intercepts/handles simpler events just as that
does, of course, yes? Doh, sorry for the noise.

Actually IIRC the ActiveX control is loaded as a child of that window, so catching the mouse events that way will probably not work. You may be able to hook into the native message queue of the IE window and do it that way, but that is probably a can of worms with no bottom.

···

On 11/11/11 11:08 AM, David Goldsmith wrote:

On Fri, Nov 11, 2011 at 12:31 AM, OlyDLG <d.l.goldsmith@gmail.com > <mailto:d.l.goldsmith@gmail.com>> wrote:

    Hi! Tried emailing Jeff Grimmett, the author of the relevant demo,
    directly (using the address in the demo) but it was bounced back
    undeliverable--maybe he still lurks here? In any event (NPI), I'm
    hoping to learn how to intercept/handle simpler events, e.g., mouse
    clicks, than those listed at the reference given in the demo, MSDN
    docs for DWebBrowserEvents2, that take place within an
    ActiveX_IEHtmlWindow. For example, I want to write an app that reads
    and processes a page's source when the user clicks on an otherwise
    "inert" object in the page (i.e., one that isn't already associated w/
    a link or an internal event handler). (FTR, the only reason why I'm
    looking at using ActiveX_IEHtmlWindow is 'cause there doesn't appear
    to be an equally "rich" way to embed another browser in a wxWindow--if
    that observation is wrong, please correct me because I would rather
    use just about any other browser technology that works in Windows and
    supports a broad array of image types, e.g., I already tried pointing
    the HtmlWindow demo at some pages I want to process as described and
    it wasn't able to render those pages' images.) Thanks in advance for
    any help.

You may want to take a look at the wxWebKit project. It's different from other approaches in that instead of embedding another toolkit's browser on a wxWindow, it actually uses wx for all of the UI elements, drawing, etc.

--
Robin Dunn
Software Craftsman

Excellent, Robin, thanks!

DG

···

On Fri, Nov 11, 2011 at 2:32 PM, Robin Dunn robin@alldunn.com wrote:

On 11/11/11 11:08 AM, David Goldsmith wrote:

Uh, think I may have answered my own question: IEHtmlWindow is derived

from wx.Window, so it intercepts/handles simpler events just as that

does, of course, yes? Doh, sorry for the noise.

Actually IIRC the ActiveX control is loaded as a child of that window, so catching the mouse events that way will probably not work. You may be able to hook into the native message queue of the IE window and do it that way, but that is probably a can of worms with no bottom.

On Fri, Nov 11, 2011 at 12:31 AM, OlyDLG <d.l.goldsmith@gmail.com > > mailto:d.l.goldsmith@gmail.com> wrote:

Hi!  Tried emailing Jeff Grimmett, the author of the relevant demo,

directly (using the address in the demo) but it was bounced back

undeliverable--maybe he still lurks here?  In any event (NPI), I'm

hoping to learn how to intercept/handle simpler events, e.g., mouse

clicks, than those listed at the reference given in the demo, MSDN

docs for DWebBrowserEvents2, that take place within an

ActiveX_IEHtmlWindow.  For example, I want to write an app that reads

and processes a page's source when the user clicks on an otherwise

"inert" object in the page (i.e., one that isn't already associated w/

a link or an internal event handler).  (FTR, the only reason why I'm

looking at using ActiveX_IEHtmlWindow is 'cause there doesn't appear

to be an equally "rich" way to embed another browser in a wxWindow--if

that observation is wrong, please correct me because I would rather

use just about any other browser technology that works in Windows and

supports a broad array of image types, e.g., I already tried pointing

the HtmlWindow demo at some pages I want to process as described and

it wasn't able to render those pages' images.)  Thanks in advance for

any help.

You may want to take a look at the wxWebKit project. It’s different from other approaches in that instead of embedding another toolkit’s browser on a wxWindow, it actually uses wx for all of the UI elements, drawing, etc.

Robin Dunn

Software Craftsman

http://wxPython.org

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en


From “A Letter From The Future” in “Peak Everything” by Richard Heinberg:
“By the time I was an older teenager, a certain…attitude was developing among the young people…a feeling of utter contempt for anyone over a certain age–maybe 30 or 40. The adults had consumed so many resources, and now there were none left for their own children…when those adults were younger, they [were] just doing what everybody else was doing…they figured it was normal to cut down ancient forests for…phone books, pump every last gallon of oil to power their SUV’s…[but] for…my generation all that was just a dim memory…We [grew up] living in darkness, with shortages of food and water, with riots in the streets, with people begging on street corners…for us, the adults were the enemy.”
Want to really understand what’s really going on? Read “Peak Everything.”