![]() |
Set Image for CXTP Button |
Post Reply ![]() |
Author | |
barobax ![]() Senior Member ![]() Joined: 07 May 2008 Status: Offline Points: 117 |
![]() ![]() ![]() ![]() ![]() Posted: 13 March 2009 at 10:28am |
Hi All,
How can I set a file for button bitmap ?!? Thanks in Advance. |
|
![]() |
|
barobax ![]() Senior Member ![]() Joined: 07 May 2008 Status: Offline Points: 117 |
![]() ![]() ![]() ![]() ![]() |
hi alll,
I need set a CXTPButton bitmap ?!? I have a file on disk and it's name is image_ce.png and I want to set it to draw on my CXTPButton Please help me, Thanks in advance |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
You need this method
BOOL CXTPButton::SetIcon(CSize size, const CXTPImageManagerIconHandle& hIcon, const CXTPImageManagerIconHandle& hIconHot, BOOL bRedraw/*= TRUE*/)
and CXTPImageManagerIcon::LoadBitmapFromFile
to load bitmap.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
barobax ![]() Senior Member ![]() Joined: 07 May 2008 Status: Offline Points: 117 |
![]() ![]() ![]() ![]() ![]() |
Hi oleg,
Thanks for your response, I tried to load PNF file format but it's did not successful and throw exception. CXTPImageManagerIconHandle var did not load HBITMAP please help me, Thanks in Advance. |
|
![]() |
|
barobax ![]() Senior Member ![]() Joined: 07 May 2008 Status: Offline Points: 117 |
![]() ![]() ![]() ![]() ![]() |
it's my code
HBITMAP hBitmap = CXTPImageManagerIcon::LoadBitmapFromFile(sFile); CXTPImageManagerIconHandle icoHandle = CXTPImageManagerIconHandle(hBitmap); m_Button_CE.SetIcon(CSize(20, 20), icoHandle); |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Check if hBitmap is not NULL after first line. Are you sure path is correct ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
barobax ![]() Senior Member ![]() Joined: 07 May 2008 Status: Offline Points: 117 |
![]() ![]() ![]() ![]() ![]() |
Hi,
My hBitmap is not NULL and my path is correct. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |