Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - About CXTPControl::SetIconId()
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

About CXTPControl::SetIconId()

 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: About CXTPControl::SetIconId()
    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!
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:20am

What "strange effect" you see?

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

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.047 seconds.