Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Problem with CXTButto::SetIcon
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with CXTButto::SetIcon

 Post Reply Post Reply
Author
Message
linfan View Drop Down
Newbie
Newbie


Joined: 05 February 2007
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote linfan Quote  Post ReplyReply Direct Link To This Post Topic: Problem with CXTButto::SetIcon
    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?
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: 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
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.188 seconds.