Print Page | Close Window

About CXTPControl::SetIconId()

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=5226
Printed Date: 13 January 2026 at 7:38am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: About CXTPControl::SetIconId()
Posted By: kle4o
Subject: About CXTPControl::SetIconId()
Date Posted: 05 October 2006 at 10:58am
Can some one explain what icon, action and control identifiers are?
If you have a control and call method CXTPControl::SetIconID with identifier of icon different from control id, you'll see some strange effects. I think that this function must be renamed to SetIconSetId!



Replies:
Posted By: Oleg
Date Posted: 06 October 2006 at 12:20am

What "strange effect" you see?



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: kle4o
Date Posted: 06 October 2006 at 2:19am

The “strange effect” is that there are no icons shown. But  in tooltip  was the right icon.

From the name of function I thought that this method sets resource identifier of an icon for the control. But it’s not true. The method sets the identifier of iconset which will be used from the control. The confusion for me became from the following method:

SetIcon(icon_id, command_id,…..) // setting the icon for the control.

In previous line icon_id is ID of resource icon. But in the SetIcon(icon_id) method, parameter icon_id is not resource identifier of an icon, but it’s a command_id.

Maybe this is my confusion only, but from the help is not clear what kind of id is set.

My code was:

pControl->GetImageManager()->SetIcon(id1,id2);
pControl->SetIconId(id1);

And there was no icon. So I had to change previous line to:

pControl->SetIconId(id2);




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