![]() |
png image not coming on button in status bar. |
Post Reply ![]() |
Author | |
Surbhi ![]() Groupie ![]() Joined: 08 July 2008 Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() Posted: 09 September 2008 at 4:46am |
Hello,
I am working on a dialog based application.In my application,i had put a button on status bar. I have also handled the event of that button. As normally the event cant be handled,i have derived one class from CXTPStatusBar. And in that class i had handled the event of that button. Now i want to put png icon on that button.i tried a lot,But its not coming. Please help me.I was trying like this - pPane = m_wndStatusBar.AddIndicator(IDC_BTN_FIRST_STATUS); pPane->SetButton(); pPane->SetStyle(xtpButtonIcon); pPane->SetPadding(10, 0, 10, 0); pPane->SetIconIndex(IDP_FIRST); UINT nIDs = IDC_BTN_FIRST_STATUS; pPane->SetText(_T("First")); m_wndStatusBar.GetImageManager()->SetIcons(IDP_FIRST ,&nIDs,1,0); But it didnt worked.Can you please tell me,what mistake i am doing? what can be the possible solution for this? Please guide me accordingly. Thanks And Regards, Surbhi. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
try
pPane = m_wndStatusBar.AddIndicator(IDC_BTN_FIRST_STATUS);
pPane->SetButton(); //pPane->SetStyle(xtpButtonIcon); pPane->SetPadding(10, 0, 10, 0); pPane->SetIconIndex(IDC_BTN_FIRST_STATUS); UINT nIDs = IDC_BTN_FIRST_STATUS; pPane->SetText(_T("First")); m_wndStatusBar.GetImageManager()->SetIcons(IDP_FIRST ,&nIDs,1,0); and be sure IDP_FIRST is PNG contained single image for IDC_BTN_FIRST_STATUS
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
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 |