Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to replace icon with specified size?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to replace icon with specified size?

 Post Reply Post Reply
Author
Message
kle4o View Drop Down
Newbie
Newbie


Joined: 05 October 2006
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote kle4o Quote  Post ReplyReply Direct Link To This Post Topic: How to replace icon with specified size?
    Posted: 05 October 2006 at 10:47am
Hi all!
I have the folowing initialization code:

pControl->GetImageManager()->SetIcon(hicon,pControl->GetID(),CSize(16,16));

How can I replace this icon with new one with same size?
When I try to use the same way to replace the old icon, there is an assert at Line 2379 in file xtpimagemanager.cpp. I found in help the metod RemoveIcon. But this metod removes all icons for the specified control.

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 06 October 2006 at 12:24am
Hello,
 
It must work. Can you show what in 2379 line of toolkit you have?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
kle4o View Drop Down
Newbie
Newbie


Joined: 05 October 2006
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote kle4o Quote  Post ReplyReply Direct Link To This Post Posted: 06 October 2006 at 1:36am
My version of Xtreme Toolkit Pro is 10.3.1. And the code is:

CXTPImageManagerIcon* CXTPImageManagerIconSet::CreateIcon(UINT nWidth)
{
    CXTPImageManagerIcon* pIcon = 0;
    if (m_mapIcons.Lookup(nWidth, pIcon))
    {
        ASSERT(pIcon->m_nID == m_nID);
        ASSERT(pIcon->m_nWidth == nWidth); // line 2379
    }
    else
    {
         ........
    }

    ASSERT(pIcon);

    return pIcon;
}

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 06 October 2006 at 2:11am

Hello,

How you initially set icon for this command?
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.059 seconds.