What's I do wrong with TTimer() ?

User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Ramesh,

>If you look at the TmsgBar Class you will not find anywhere a logic which
can release the bitmap handles when the object is ended.

Bitmaps belonging to msgItems are released in the TMsgBar:Destroy() method.

Have you tried refreshing the messagebar after deleting the bitmaps?

Regards,
James
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post by RAMESHBABU »

Mr.James,

>Have you tried refreshing the messagebar after deleting the bitmaps?

I tried with oWnd:oMsgBar:Refresh() as under

Code: Select all

STATIC FUNCTION GetSignalStrength()

LOCAL cNewResource

IF VALTYPE(oSignalStrength) = "O"
   DeleteObject( oSignalStrength:hBitmap1 )
   cNewResource             := "SIGNAL"+LTRIM(STR(ROUND(objSMS:SignalStrength/10,0)*10))
   oSignalStrength:hBitmap1 := LoadBitmap( GetResources(), cNewResource ) 
   oSignalStrength:Paint() 
   oWnd:oMsgBar:Refresh()
ENDIF

RETURN nil

But the program is quitting suddenly.

Thanks

- Ramesh Babu P
Post Reply