Print Page | Close Window

How to replace icon with specified size?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=5225
Printed Date: 13 January 2026 at 5:26am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to replace icon with specified size?
Posted By: kle4o
Subject: How to replace icon with specified size?
Date 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.




Replies:
Posted By: Oleg
Date 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


Posted By: kle4o
Date 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;
}



Posted By: Oleg
Date Posted: 06 October 2006 at 2:11am

Hello,

How you initially set icon for this command?


-------------
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