Click here to Skip to main content
15,904,503 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,
We are developing a C# windows application which scrolls the selected windows automatically by using(hooking) win32 SendMessage() function and later will display the no. of pixels scrolled using GetScrollInfo() function.

The SendMessage() is working properly & is scrolling all windows including IE. But GetScrollInfo() is not working for IE as IE does not use win32 scroll bars. So we are facing the following issues :

(1) When the IE window is being scrolled the SendMessage() will be called infinitely because we are not able to put the condition as we don't know the max scrollable size of the window.
(For other windows we are getting it by SCROLLINFO structure and GetScrollInfo() function.)

(2) We tried with ---- mshtml.dll
- On the occurance of mshtml.HTMLWindowEvents2_Event.onscroll event, we are getting
mshtml.IHTMLElement2.scrolltop value & it is giving us the present scrollbar top position... when we scroll manually. But if we scroll the IE window by hooking SendMessage() function... IE window will scroll but the HTMLWindowEvents2_Event.onscroll will not be called & mshtml.IHTMLElement2.scrolltop value will not be available.

But while the IE window is being scrolled automatically... if we click once on scroll bar thumb it gives us the mshtml.IHTMLElement2.scrolltop value...

So we are not getting a way to obtain scrolled area size in IE after completion of automatic scrolling...

Please help us in this regard.
Thank you.
Posted
Updated 10-Feb-10 5:20am
v5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900