PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Batsheva Asaph on February 25, 2013, 07:07:11 AM

Title: New GraphicControl with Roca's Classes
Post by: Batsheva Asaph on February 25, 2013, 07:07:11 AM
Hi,

Are there any examples on how to use the new GraphicControl with Jose Roca's Classes.
It's clear on how to use it with the flat api.

Thanks,
BatSheva
Title: Re: New GraphicControl with Roca's Classes
Post by: José Roca on February 25, 2013, 03:23:10 PM
Don't check the GdiPlus aware box, include CGdiPlus.inc and follow the examples ( http://www.jose.it-berater.org/smfforum/index.php?board=417.0 ), e.g.


' // Create an instance of the GdiPlus class
LOCAL pGdip AS IGdiPlus
pGdip = NewGdiPlus

' // Get the memory device context of the graphic control
LOCAL hdc AS DWORD
hdc = GraphCtx_GetDc(<handle of the graphic control>)


' // Create a graphics object
LOCAL graphics AS IGdipGraphics
graphics = pGdip.Graphics(hdc)

'   // Set up the arc.
LOCAL redPen AS IGdipPen
redPen = pGdip.Pen(pGdip.Color(255, 255, 0, 0), 3)

'  // Draw the arc.
graphics.DrawArc(redPen, 0, 0, 200, 100, 0, 90)

Title: Re: New GraphicControl with Roca's Classes
Post by: Batsheva Asaph on February 26, 2013, 02:41:08 PM
Thanks Jose

BatSheva