Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - XTPImageManager
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

XTPImageManager

 Post Reply Post Reply
Author
Message
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Topic: XTPImageManager
    Posted: 01 April 2008 at 9:38am
Hi,

I use follow in OnInitDialog to set a dialog icon.

    XTPImageManager()->SetIcon(IDR_MAINFRAME, IDR_MAINFRAME);
    CXTPImageManagerIconSet *pIconSet = XTPImageManager()->GetIconSet(IDR_MAINFRAME);
    if (pIconSet)
    {
        CXTPImageManagerIcon *pIcon = pIconSet->GetIcon(32);
        if (pIcon)
            SetIcon(pIcon->GetIcon().GetIcon(), TRUE);

        pIcon = pIconSet->GetIcon(16);
        if (pIcon)
            SetIcon(pIcon->GetIcon().GetIcon(), FALSE);
    }

But pIcon->GetIcon().GetIcon() return 0.
Why ?

    Jimmy

I see that m_pRInfo is set.

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: 01 April 2008 at 12:44pm
Hi,
Yes, ImageManager from 11.2.2 release stores all images in single bitmap to save GDI handlers.
 
Its kind of bad idea to use such method to set icon for main frame. Only Windows XP support Alpha icon in windows captions. Use standard AfxGetApp()->LoadIcon method.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Benit View Drop Down
Newbie
Newbie
Avatar

Joined: 14 March 2011
Location: India
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Benit Quote  Post ReplyReply Direct Link To This Post Posted: 21 March 2011 at 7:18am
Hi ,
 
I have an issue related to SetIcon.
I was trying to set icon when while updating my browser frame.
BOOL bHighlight = IsKeyWordHighlighte();
if(bHighlight)
{XTPImageManager()->SetIcon ( IDI_ICON_HIGHLIGHTCLICK, ID_TBTBN_HIGHLIGHT ); }
else
{XTPmageManager()->SetIcon ( IDI_ICON_HIGHLIGHTNORMAL, ID_TBTBN_HIGHLIGHT ); }
 
this is crashing sometimes when i am trying to switch between windows.
Can u explain me the scenarios where seticon will fail
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.172 seconds.