![]() |
Set Image for CXTP Button |
Post Reply
|
| Author | |
barobax
Senior Member
Joined: 07 May 2008 Status: Offline Points: 117 |
Post Options
Thanks(0)
Quote Reply
Topic: Set Image for CXTP ButtonPosted: 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 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 March 2009 at 5:15pm |
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 March 2009 at 7:26am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 March 2009 at 3:48pm |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 March 2009 at 5:26pm |
|
it's my code
HBITMAP hBitmap = CXTPImageManagerIcon::LoadBitmapFromFile(sFile); CXTPImageManagerIconHandle icoHandle = CXTPImageManagerIconHandle(hBitmap); m_Button_CE.SetIcon(CSize(20, 20), icoHandle); |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 March 2009 at 1:39am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 March 2009 at 2:17am |
|
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 |