Hello,

In my GDI Borland C++ application, there is a Form with FormPaint method which Copy a Tmp->Canvas (Tmp beeing of TImage type) on the Canvas related to the Form. So each time the WM_PAINT message is generated, the display gets up to date.

The object also has some methods that perform drawing (Rectangle, Textout) on the
Tmp->Canvas.

My problem is that after some time, it seems that Tmp->Canvas gets invalide because FormPaint displays a blank screen what I think comes from invalide data in Tmp->Canvas.

I think this is due to the drawing (Rectangle, Textout...) methods, because when those are not used, everything goes fine.

Tmp is declared as:

TImage *Tmp and is a private member of the Form class.

Tmp is allocated in FormShow:

Tmp new TImage(this);

Really don't know what can be wrong... Are there other memory allocation that should be done prior to Timage usage?

Can someone help me?