wxGCDC sample

BlitzMax Modules Forums/Brucey's Modules/wxGCDC sample

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

It probably wants one.

But you should be able to do something like this, in your Paint event :
	Function OnPaint(event:wxEvent)

		Local canvas:MyWidget = MyWidget(event.parent)

		Local pdc:wxPaintDC = New wxPaintDC.Create(canvas)
		Local dc:wxGCDC = New wxGCDC.Create(pdc)
		canvas.PrepareDC(dc)
...

		dc.Free()

Not sure if you need to implicitly free the wxPaintDC too. (you'll find out on Windows soon enough, if you do).