XTPImageManager |
Post Reply |
Author | |
jimmy
Senior Member Joined: 11 November 2003 Location: Austria Status: Offline Points: 515 |
Post Options
Thanks(0)
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. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
Benit
Newbie Joined: 14 March 2011 Location: India Status: Offline Points: 8 |
Post Options
Thanks(0)
|
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 |
|
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 |