PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Pat Dooley on June 04, 2013, 04:20:38 PM

Title: Graphic Control scroll bars
Post by: Pat Dooley on June 04, 2013, 04:20:38 PM
I'm using the graphic control and Debenu's Quick PDF Library to render a page from a pdf file.
It works well and looks fine. However, if I zoom in, I would like to move the image around either
by dragging or using the scroll bars.
How do I access the scroll bars in the graphic control?
Title: Re: Graphic Control scroll bars
Post by: José Roca on June 04, 2013, 08:54:11 PM
To access the scroll bars, you must set the virtual buffer to the size of the image, before displaying the image.
Title: Re: Graphic Control scroll bars
Post by: Pat Dooley on June 05, 2013, 05:35:28 PM
I finally got the scroll bars to function by setting the Stretchable property to False and Resizable to True.
Also, it appears that to get the scroll bars to even appear, I have to set the virtual buffer width and height
to larger values at design time. I'm using 4 times the rendering DPI.
The basic code is:
myDC=GraphCtx_GetDc ( HWND_FORM1_GRAPHICCONTROL1 )
nResult=DPL.SetRenderScale(nScale)
nResult=DPL.RenderPageToDC(nDPI,nPage,myDC)
FF_Control_Redraw HWND_FORM1_GRAPHICCONTROL1

The DPL stuff is the Quick PDF Library ActiveX API.
It also doesn't seem to matter if the GDIPlusAware is set
to true or false, even though the Quick PDF docs specifically mention
GDI Plus.
Still some work to do in my understanding.