New GraphicControl with Roca's Classes

Started by Batsheva Asaph, February 25, 2013, 07:07:11 AM

Previous topic - Next topic

Batsheva Asaph

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

José Roca

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)


Batsheva Asaph