Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - 32x32 Icons not transparent
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

32x32 Icons not transparent

 Post Reply Post Reply
Author
Message
Tsenoh View Drop Down
Groupie
Groupie
Avatar

Joined: 08 November 2006
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tsenoh Quote  Post ReplyReply Direct Link To This Post Topic: 32x32 Icons not transparent
    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!
Back to Top
Tsenoh View Drop Down
Groupie
Groupie
Avatar

Joined: 08 November 2006
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tsenoh Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 27 November 2006 at 11:52am
Hello,
Difficult to say without debugging. Maybe problem in icons  you have.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Tsenoh View Drop Down
Groupie
Groupie
Avatar

Joined: 08 November 2006
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tsenoh Quote  Post ReplyReply Direct Link To This Post 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!
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.125 seconds.