problem with scrollWidth and scrollHeight for a particular website


  • Hi,

    I am developing a BHO for IE 8 and above using ATL. I am having a interface pointers to IWebBrowser2 and IHTMLElemnet. I am calling get_Body on IHTMLDocument2 and get_documentElement on IHTMLDocument3. With both the document interfaces I am getting IHTMLElement and from IHTMLElement interface pointer I am getting scrollWidth and scrollHeight using the funtions get_scrollWidth() and get_scrollHeight().

    I am facing a problem with the site
    Please open this site and Click on "Play Now" button to open a flash. This will open a flash player and it will start playing a flash video.

    I am facing a problem at this point. When I call get_scrollWidth(&m_lScrollWidth) and get_scrollHeight(&m_lScrollHeight) on IHTMLElement I am getting the same values and they are wrong. If I analyze theese values, it looks like it is the width and height of the flash content. Even I am getting same values when i resize the window or when i scrolled down.

    Behavior is same for both body IHTMLElement (IHTMLDocument2 HTML body element) and documentElement IHTMLElement (IHTMLDocument3 document HTML element). But these functions are working fine for most of the sites but it is not working for this specific site. 

    Please help me to get the correct scrollWidth and scrollHeight when browser is resized for these kinds of site where flash will popup. It looks like these kind of sites are different from others and there should be some way to get these values.

    Thanks & Regards,

    21. června 2012 18:16

Všechny reakce