CommandBar SetIconId = Blank image |
Post Reply |
Author | |
sdancer75
Groupie Joined: 08 July 2008 Location: Greece Status: Offline Points: 70 |
Post Options
Thanks(0)
Posted: 20 October 2014 at 4:21am |
Hi,
I am trying to change an image icon to a CXTPControl in the command bars but instead I get blank image. The code I use is that is shown below : CXTPControl *m_pAttachmentControl; ............... m_pAttachmentControl = pGroup->Add(xtpControlButton, IDS_BUTTON_ATTACHMENT); m_pAttachmentControl->SetStyle(xtpButtonIconAndCaptionBelow); .................. if (CheckIfExistFileProjects()) { m_pAttachmentControl->SetIconId(IDB_PNG_ATTACHMENT_FULL); m_pAttachmentControl->RedrawParent(); } else { m_pAttachmentControl->SetIconId(IDB_PNG_ATTACHMENT_EMPTY); m_pAttachmentControl->RedrawParent(); } What seems to be the problem in my code ? Regards, |
|
Just me!
|
|
sdancer75
Groupie Joined: 08 July 2008 Location: Greece Status: Offline Points: 70 |
Post Options
Thanks(0)
|
Ok,
What did I find. I found that XTPImageManager()->SetIcons(........) converts PNG or BMP files to Icons BUT XTPImageManager()->SetIcon(....) and PControl->SetIconId expects exclusively ICONS without the option to convert other formats (like png or bmp) to Icons. So if you try to use XTPImageManager()->SetIcon(....) with PNG your get Blank Dreams ! Any recommendations ? Regards, |
|
Just me!
|
|
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 |