Page 2 of 2

PostPosted: Fri Oct 17, 2008 5:43 pm
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

PostPosted: Sun Oct 19, 2008 3:11 am
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  Expand view
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