Print Page | Close Window

png image not coming on button in status bar.

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=12110
Printed Date: 28 February 2025 at 6:59pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: png image not coming on button in status bar.
Posted By: Surbhi
Subject: png image not coming on button in status bar.
Date 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.



Replies:
Posted By: Oleg
Date Posted: 09 September 2008 at 5:28am
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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net