Print Page | Close Window

Problem with CXTButto::SetIcon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=6854
Printed Date: 16 September 2024 at 4:11pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with CXTButto::SetIcon
Posted By: linfan
Subject: Problem with CXTButto::SetIcon
Date Posted: 12 April 2007 at 9:40pm
I have some buttons (use CXTButton) in my application, and I've stored all the icons (32bits) they need in a CImageList, so I use the following code to set icon of the buttons.

for (int i...)
{
    m_btn.SetIcon(szIcon, m_imglstButtons.ExtractIcon(i));
}


It works. The problem is that when I disable a button, the grey icon shows with a black background, what's wrong?



Replies:
Posted By: Oleg
Date Posted: 13 April 2007 at 12:34am
Hi,
 
For alpha icons you can't set HICON. You can load bitmap:
m_btn1.SetBitmap(0, IDB_ALPHA_SETTINGS);
or use CXTPImageManager.


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



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