Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTButton bitmap (BMP) transparency
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTButton bitmap (BMP) transparency

 Post Reply Post Reply
Author
Message Reverse Sort Order
thodgson View Drop Down
Groupie
Groupie


Joined: 11 August 2003
Status: Offline
Points: 78
Post Options Post Options   Thanks (0) Thanks(0)   Quote thodgson Quote  Post ReplyReply Direct Link To This Post Topic: CXTButton bitmap (BMP) transparency
    Posted: 27 October 2005 at 9:00am


Okay, that will work.
Tim H(http://www.ExclamationSoft.com)
Product: Xtreme Toolkit v13.1
Platform: Vista(x64)-SP1
Language: Visual C++ 6.0
Currently: Satisfied w/ Toolkit
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: 27 October 2005 at 7:02am

There is no way :(

Can suggest you manually convert it to icon and use SetIcon with hIcon parameter:

 

 CImageList il;
 il.Create(bmp.bmWidth, bmp.bmHeight, ILC_COLOR24 | ILC_MASK, 0, 1);
 il.Add(CBitmap::FromHandle(m_hBitmap), crTransparent);

 ASSERT(il.GetImageCount() == 1);

 il.ExtractIcon(0);

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
thodgson View Drop Down
Groupie
Groupie


Joined: 11 August 2003
Status: Offline
Points: 78
Post Options Post Options   Thanks (0) Thanks(0)   Quote thodgson Quote  Post ReplyReply Direct Link To This Post Posted: 26 October 2005 at 1:56pm

Is there a way to specify the transparency color of a bitmap for an icon specified for a CXTButton?

I've noticed that the color is determined by the color at pixel point 0,0 - maybe this is wrong but...

Tim H(http://www.ExclamationSoft.com)
Product: Xtreme Toolkit v13.1
Platform: Vista(x64)-SP1
Language: Visual C++ 6.0
Currently: Satisfied w/ Toolkit
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.094 seconds.