ihtmlelement2 functions cause access violation in IE7
Good day.
I have this problem and would really appreciate any help and ideas from anyone.
I have created a web browser control (IWebBrowser2) hosted inside a CAxWindow. My task is to make this browser scroll programmatically depending on what scrollType is submitted. The code using IHTMLWindow2::scrollBy and IHTMLElement2::put_scrollTop (both with IHTMLDocument2 and IHTMLDocument3) worked fine in IE6. (These solutions can be found everywhere)
But now, when I try to run it in IE7, i get access violation errors when i call these functions. I also get access violations when I call IHTMLDocument2::get_parentWindow, IHTMLElement2::get_scrollHeight, get_scrollWidth, get_scrollTop, and many others. I really do not know what's causing the crash. Spent a week looking for the solution and no answer yet. (By the way, a similar problem in other forums was posted by me.. so not helpful since no one has answered yet.)