Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - png image not coming on button in status bar.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

png image not coming on button in status bar.

 Post Reply Post Reply
Author
Message
Surbhi View Drop Down
Groupie
Groupie


Joined: 08 July 2008
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote Surbhi Quote  Post ReplyReply Direct Link To This Post Topic: png image not coming on button in status bar.
    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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.