Scroll whole document OR set absolute scroll position

If you are a C/C++/C# developer and have any questions about using our products from your application here is the place to post them.
Post Reply
beandog
Posts: 33
Joined: Wed Dec 14 2005

Scroll whole document OR set absolute scroll position

Post by beandog »

I'm using MFC. I need to be able to scroll through the entire length of a PDF document that's open with one scrollbar. I can't see a built-in way to do this, so I'm trying to implement it using an external scrollbar. It's pretty easy to move to the correct page based on the scrollbar's position, but I can't figure out how to tell the control exactly where to scroll to (or even what position it's currently at) in the displayed page. How do I access this information?



~BenDilts( void );
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello,

I suggest that you look at the ScrollWindow() method of the PDF Creator.

The ScrollWindow method can be used to scroll the document window by HorzScroll and VertScroll increments.

Hope this helps?
beandog
Posts: 33
Joined: Wed Dec 14 2005

Kind of...

Post by beandog »

Yes, I realize that function exists. I've played around with it a little. But while I can force it to scroll, I can't figure out a way to get feedback from it when a user manually scrolls up or down (or uses the mouse wheel if the scrollbar is turned off). Also, I can't figure out how exactly it decides how much to scroll. While a page is supposedly 13000 or so twips, I scroll down 150 twips and I'm at the bottom of the page.
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello,

The ScrollWindow() method of the PDF Creator does receive TWIPS values as parameters. However, these values are not where you want to scroll to but how much you want to scroll from your current position.

In reference to your other question, ScrollWindow() or scrollbars unfortunately do not fire events.

Hope this helps?
Post Reply