Re: CHtmlView and javascript window.returnValue
Francesco Vitale <francesco.vitale@gmail.com> wrote:
I wonder how to get the values returned by a javascript function
(window.returnValue)
I used the ShowHtmlDialog and it was really straightforward!! (It's
the last paramether in the signature)
Now I have to use the CHtmlView and I really can't get how to
retrieve
the returned values.
window.returnValue has no special meaning, except in dialogs produced by
ShowHtmlDialog and similar. It is just another property on the window
object - you can create as many as you want.
Here's how to read it. Call CHtmlView::GetHtmlDocument, query the
pointer for IHTMLDocument2, call get_parentWindow. From window pointer,
you can read any named property using late binding
(IDispatch::GetIdsOfNames / Invoke).
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925