How to detect Internet Explorer onscroll event in v++.NET?

Add-in Express™ Support Service
That's what is more important than anything else

How to detect Internet Explorer onscroll event in v++.NET?
 
minho so




Posts: 11
Joined: 2013-03-11
i want ie scroll bar event....

When a new version?

http://www.add-in-express.com/forum/read.php?FID=10&TID=11502

I implemented the workaround described here:
http://stackoverflow.com/questions/9971783/onscroll-event-handling-in-c-sharp-bho-for-ie9
Now the OnScroll event works. We will publish a new version of the product with the fix on Monday.
Posted 19 Mar, 2013 04:37:39 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Minho,

Please download the new version of the product here: http://www.add-in-express.com/downloads/adxnet-ie.php
I also uploaded the example with the auto hide feature and the OnScroll event:
http://www.add-in-express.com/files/projects_pub/ie-auto-hide-advbar-with-onscroll-cpp.zip
Posted 19 Mar, 2013 09:49:21 Top
minho so




Posts: 11
Joined: 2013-03-11
Example, has been well received.
However, there is a problem if you want to test, as shown below.

1) http://news.naver.com/

-> scrolltop always 0 in the above site emerges.

2) http://blog.naver.com/kanggadin11?Redirect=Log&logNo=110161434141&from=section

-> Above site scrolltop always 0 or is not an event.

3) page is refresh or many navigate

-> scroll events are not.

----
frames site perhaps there is a problem.
Posted 21 Mar, 2013 02:46:03 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Minho,

1. I can't reproduce it in Win7+IE10. Anyway, please try to change the code of the OnScroll event handler as shown below:
mshtml::IHTMLElement2^ pRoot = dynamic_cast<mshtml::IHTMLElement2^>(HTMLDocument()->documentElement);
					 if (pRoot != nullptr && pRoot->scrollTop > 0)
					 {
						MessageBox::Show(pRoot->scrollTop.ToString());
						return;
					 }

					 mshtml::IHTMLElement2^ pBody = dynamic_cast<mshtml::IHTMLElement2^>(HTMLDocument()->body);
					 if (pBody != nullptr && pBody->scrollTop > 0)
					 {
						 MessageBox::Show(pBody->scrollTop.ToString());
						 return;
					 }


2. The web page has the old design and it contains frameset and some frames elements.
I didn't manage to get the scroll position via the MSHTML object model. I will continue working on this issue and will let you know when I find any reliable solution.
Posted 21 Mar, 2013 05:54:45 Top