how to get the native DC value in Tkinter/wxPython for drawing?

O

oyster

I am porting www.rmchart.com to python, now the code is almost
finished, and I have supplied some examples.py which write to
picturefiles directly, but the example to draw the chart on GUI stops
me.

that is the vb declaration
nResult (LONG) = RMC_CreateChartOnDC(
ByVal nParentDC (LONG),
ByVal nCtrlId (LONG),
ByVal nX (LONG),
ByVal nY (LONG),
ByVal nWidth (LONG),
ByVal nHeight (LONG),
)
nParentDC (LONG) is Device context, on which the chart shall be painted

If I pass DC=ctypes.windll.user32.GetDC(0) to it, the chart is shown
on the windows, but I don't know how to get the DC in wxPython. It
seems that self.GetHandle() in wxPython does not help.

Can anyone help me?

thanx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top