Print Page | Close Window

32x32 Icons not transparent

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=5616
Printed Date: 29 September 2024 at 12:18am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: 32x32 Icons not transparent
Posted By: Tsenoh
Subject: 32x32 Icons not transparent
Date Posted: 27 November 2006 at 10:18am
Hi!

I have a problem with dynamically created buttons in RibbonBar.

When I use 16x16 size icons (xtpButtonIconAndCaption) everything is fine. Problem occurs when I use 32x32 size icons (xtpButtonIconAndCaptionBelow). The transparent area of the icon is painted black.

Here is the code I use to create buttons:

pTab = m_pRibbonBar->FindTab(pElement->nInternalParameter1);
pGroup = pTab->FindGroup(pElement->nInternalParameter2);

CMyXTPControlButton* pControl = new (CMyXTPControlButton);
HICON hIcon = (HICON) LoadIcon(AfxGetInstanceHandle(),
    MAKEINTRESOURCE((UINT)pElement->dParameter1));
pControl->SetCustomIcon(hIcon);
pControl->SetTooltip(pElement->cToolTip);
pControl->SetID(nElement);
pControl->SetParentDialog(this);
pControl->SetCaption(pElement->cName);
pGroup->Add(pControl, nElement, pElement->cName);

Any idea?

Thanks!



Replies:
Posted By: Tsenoh
Date Posted: 27 November 2006 at 10:19am
P.S. I am using XtreemeCommandBars 10.3.1 with VC++ 6.0 SP6 and Windows XP Home.


Posted By: Oleg
Date Posted: 27 November 2006 at 11:52am
Hello,
Difficult to say without debugging. Maybe problem in icons  you have.


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


Posted By: Tsenoh
Date Posted: 28 November 2006 at 10:19am
Indeed, I tried using some other icons and there was no problem. Strange thing though, because the first icons were properly displayed in VC++ 6.0 resource window (transparent area was pink).

Thanks!



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