Page 1 of 1

How to change a bitmap in message bar in runtime ?

Posted: Fri Oct 10, 2008 5:16 am
by RAMESHBABU
Hello,

As per subject. I did not find any method to change the bitmaps in TMsgItem Class in run time similar to ::SetText(cText) method.

Can anybody guide me how to do it.

- Ramesh Babu

Posted: Fri Oct 10, 2008 8:07 pm
by yury
hello Mr.Ramesh,

try this:

Code: Select all

oMsgBarItem:hBitmap1 = LoadBitmap( GetResources(), cNewResorce )
oMsgBarItem:Paint()
where oMsgBarItem is the TMsgItem component and cNewResource the name of new resource

regards

Posted: Fri Oct 10, 2008 9:18 pm
by Antonio Linares
Yuri, Ramesh,

First do a:

DeleteObject( oMsgBarItem:hBitmap1 )