Loading...

Scrollbar size

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

Scrollbar size

Postby MarkWarren » Mon Mar 23, 2009 1:55 pm

I am using the latest version of GdViewer in Visual Studio/C++ and want to get the size of the viewer without including the scrollbars. GetDisplayedArea() returns the same dimensions whether there are scrollbars or not. GetScrollBarCtrl() returns NULL and GetScrollBarInfo() returns FALSE.

So how do I get the viewer size or the scrollbar size ?
MarkWarren
 
Posts: 2
Joined: Mon Mar 23, 2009 1:28 pm

Re: Scrollbar size

Postby Loïc » Mon Mar 23, 2009 4:39 pm

Hi,

the GetDisplayedArea() returns the portion (or area) of the image which is displayed. For me, the returned coordinates are different if the scrollbars are displayed or not.

The scrollbars have a fixed width: 16 pixels.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Scrollbar size

Postby MarkWarren » Mon Mar 23, 2009 7:10 pm

Hi,

Not working for me. I am not using the force scrollbars function.

The area for the image is 1106 pixels as given by GetClientRect().

When I first load up the PDF GetDisplayedArea() gives a width of 4955 at a zoom of 0.2232 which multiplies to 1106 pixels - no scrollbars.

I zoom in and get a width of 1529 at a zoom of 0.7232 which multiplies to 1106 pixels - with scrollbars. I would have expected a width of 1507 which would multiply to 1090 pixels in this case.

I am currently using a hard coded value of 16 pixels for the width of the scrollbar, but obviously I would prefer to use functions on the GdViewer to get this if possible to prevent future changes breaking my code.
MarkWarren
 
Posts: 2
Joined: Mon Mar 23, 2009 1:28 pm


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest

cron