Board index » cppbuilder » Re: graphics not displaying after recieving data from serial port in seperate thread? only under XP

Re: graphics not displaying after recieving data from serial port in seperate thread? only under XP


2003-07-21 08:23:41 PM
cppbuilder31
Hi Bruce,
do you draw into the canvas or status bar in the thread? Than you have to
use the function Synchronize().
Detlef
"Bruce Larrabee" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote

I'm using draw methods like MoveTo and LineTo to draw on a Canvas.

I'm recieving data through a serial port from a digitizer. The port is
in a seperate thread.

Under WindowsXP, after the first byte comes in from the serial port all
the graphics drawn on the Canvas disapear and it is no longer possible
to draw to the Canvas. (you can draw but nothing ever appears again)

No other part of the program seems to be affected. For example the data
from the serial port still appears in the status bar, in real time.

There has never been any problem using Win98 or Win95.

Can anyone help?


Bruce Larrabee



 
 

Re:Re: graphics not displaying after recieving data from serial port in seperate thread? only under XP

Thanks much for your response... B) I've been studying this and your
suggestion makes a lot of sense. (I had the same thought this weekend.)
I'm going to try that as soon as I get back on the digitizer, probably
tomorrow. This code has always worked fine under Win98? But I'll
definitely try this tomorrow. I'll post my results.
Oh, btw, the status bar displays the X, Y & Z coordinates from the
digitizer, and that still is working fine... But that code doesn't
actually get called from the I/O thread. The drawing code, drawing to
the Canvas does get called from the I/O thread. Very perceptive of you.
Have you done this sort of thing?
Thanks,
Bruce
 

Re:Re: graphics not displaying after recieving data from serial port in seperate thread? only under XP

Use TCAD at:
www.codeidea.com
"Bruce Larrabee" < XXXX@XXXXX.COM >????
Quote
Thanks much for your response... B) I've been studying this and your
suggestion makes a lot of sense. (I had the same thought this weekend.)
I'm going to try that as soon as I get back on the digitizer, probably
tomorrow. This code has always worked fine under Win98? But I'll
definitely try this tomorrow. I'll post my results.

Oh, btw, the status bar displays the X, Y & Z coordinates from the
digitizer, and that still is working fine... But that code doesn't
actually get called from the I/O thread. The drawing code, drawing to
the Canvas does get called from the I/O thread. Very perceptive of you.
Have you done this sort of thing?

Thanks,

Bruce

 

{smallsort}