mshtml

Not getting event arguments in IHTMLElement event handler

匆匆过客 提交于 2019-12-05 15:34:47
I've added a callback to an IHTMLElement instance but when the IDispatch::Invoke is called for the event, there are never any arguments (i.e. the pDispParams->cArgs and pDispParams->cNamedArgs are always 0). For example, I add a callback for an onmouseup event. From what I can tell, a callback for this event is supposed to receive a MouseEvent object. Is that correct? If so, what do I need to do to ensure this happens? This is using the MSHTML for IE 6 sp2 (or better) on Windows XP SP2. Events arguments for all DOM events including onmouseup are stored in the parent window's event property (

DocumentComplete event in Embedded IWebBrowser2 using write() method

一笑奈何 提交于 2019-12-05 14:38:06
I've been looking hard for this but still have not found any solution. I'm using native win32 c++ (no MFC, ATL or .NET) I'm loading an html document with IHTMLDocument2->write(). I would like to get the event when the page is ready to show, meaning that all images and elements are downloaded and rendered. Following the embedded browser object from here embedded web control (IWebBrowser2), embedded javascript's onkeydown and onkeyup not firing and from here http://www.codeproject.com/Articles/3365/Embed-an-HTML-control-in-your-own-window-using-pla I managed to get an embedded web browser

Any workaround to get text in an iFrame on another domain in a WebBrowser?

a 夏天 提交于 2019-12-05 10:52:48
You will probably first think is not possible because of XSS restrictions. But I'm trying to access this content from an application that hosts a WebBrowser , not from javascript code in a site. I understand is not possible and should not be possible via non hacky means to access this content from javascript because this would be a big security issue. But it makes no sense to have this restriction from an application that hosts a WebBrowser . If I'd like to steel my application user's Facebook information, I could just do a Navigate("facebook.com") and do whatever I want in it. This is an

Fire event with vba & InternetExplorer.Application to recalculate jquery form

两盒软妹~` 提交于 2019-12-05 04:10:01
问题 I'm trying to gather data from different websites. Therefore i'm using excel vba and start an internet explorer. I'm able to fill out a normal form. But sometimes i have to fill out a dynamic form with a jquery script behind. The form will only enable all input fields (drop down menus), if the first 2 fields are filled out and an event is fired. So my script is able to fill out the form but not to fire the "recalculation" event which is needed. If you fill out the form manually with your

Delphi TChromium / DCEF3 - Constant Access Violations

a 夏天 提交于 2019-12-04 17:15:44
I'm trying to use DCEF3 TChromium as a replacement for TWebbrowser component. I downloaded the packages and installed it on my IDE (Delphi 2007). I'm testing the demo on demos\guiclient and when i try to open certain web pages, i get tons of Access Violation exceptions and my app crashes. If i'm inside Delphi, i get this exception before Delphi itself crashes : 'Assertion failure : 'item.src' in \win32scr\DBKIMPL.CPP' at line 2691' One example of a page that has this problem is www.whatsmyuseragent.com One example of a page that opens correctly is www.google.com After a lot of testing i found

Is there an event that fires when DOM is modified in MSHTML IE8?

无人久伴 提交于 2019-12-04 09:11:20
Trying to detect if new elements are added or removed from the DOM in MSHTML. Is there such event that will fire? http://msdn.microsoft.com/en-us/library/aa741877(v=VS.85).aspx In IE9 there is IDOMMutationEvent::initMutationEvent http://msdn.microsoft.com/en-us/library/ff975905(v=vs.85).aspx Yes, it is possible now in IE8, though it is not part of the MSHTML event structure, but Accessibility. Trigger (EVENT_OBJECT_REORDER) is new in IE8 - See http://blogs.msdn.com/b/ie/archive/2008/12/10/new-accessibility-features-in-ie8.aspx?PageIndex=7 We use it with out BHO, but you could equally hook

MSHTML tutorial [closed]

て烟熏妆下的殇ゞ 提交于 2019-12-04 07:16:27
I want to learn some basics about MSHTML, like how to use IHtmlDocument and IHtmlDocument2 interfaces. I searched for quite a while, but can not find out a tutorial for beginners. Could anyone recommend something to read? EDIT: I prefer to use C#. When I was learning to use MSHTML I mostly relied on the MSDN documentation and asked specific details in newsgroups and sites like this. It also helped me alot to download the whole Windows SDK instead of reading online. If you are using C#, then you should not be using MSHTML. Use the WebBrowser component if you're using Windows Forms, use any of

Fire event with vba & InternetExplorer.Application to recalculate jquery form

爷,独闯天下 提交于 2019-12-03 20:54:55
I'm trying to gather data from different websites. Therefore i'm using excel vba and start an internet explorer. I'm able to fill out a normal form. But sometimes i have to fill out a dynamic form with a jquery script behind. The form will only enable all input fields (drop down menus), if the first 2 fields are filled out and an event is fired. So my script is able to fill out the form but not to fire the "recalculation" event which is needed. If you fill out the form manually with your mouse it works. How can i simulate this event? This is my excel vba script: Sub test_fill_form() Dim url1

WPF WebBrowser control doesn't enter design mode when the document property is changed

£可爱£侵袭症+ 提交于 2019-12-03 15:55:16
I have a frustrating problem. Here's a simplified version of what I'm doing: A UserControl in c# contains a toolbar and an embedded WebBrowser object. The toolbar contains an "Edit" button, which when clicked sets the webbrowser control in design mode. Another button, "Cancel", turns off design mode. Pseudocode (very simplified): public void SetDesignMode(bool dm) { IHTMLDocument2 doc = webBrowser.Document as IHTMLDocument2; if (dm) doc.designMode = "On"; else doc.designMode = "Off"; _designMode = dm; ReloadDocument(); // setting designmode clears the document element, so it must be reloaded }

How to render HTML element without using web browser?

二次信任 提交于 2019-12-03 11:34:23
问题 Is there a way how to draw specific HTML element content on a canvas without using any web browser control ? With this code I'm rendering the element to the form's canvas (just as an example). It works though, but this code is not a good practice - see below, why... uses SHDocVw, MSHTML; procedure TForm1.Button1Click(Sender: TObject); var WebBrowser: TWebBrowser; HTMLElement: IHTMLElement; HTMLRenderer: IHTMLElementRender; begin WebBrowser := TWebBrowser.Create(nil); try WebBrowser