Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CmdSetIcon() & RGBA icons Collapse All
Subject Author Date
Alastair Watts Oct 17, 2011 - 3:41 AM


I currentlty use g_CmdManager->CmdSetIcon() to set command icons.  The alpha channel is not displayed correctly when using RGBA icons, how do we fix this?


 


 


Alastair Watts Nov 3, 2011 - 4:32 AM

I think you misunderstand me.  I’m not using image lists, I only asked if the Prof-UIS command manager did. 


LoadImage() is not affecting the image as it draws correctly with DrawIconEx().


When using icons in Prof-UIS commands or Prof-UIS grids the icons are not being displayed correctly around the edges.


 

Technical Support Nov 2, 2011 - 12:20 PM

We mean you can fix the problem with a high color image list by creating a image list of ILC_COLOR32 type and then adding 32-bit color icons into it. But our command manager is not based on Win32 image lists. If you saw bad icons somewhere, then their quality were damaged by some APIs. Please note, the LoadImage() Win32 API may decrease the color depth of a loaded icon if current video mode on your monitor is not 24 or 32 bit.

Alastair Watts Nov 1, 2011 - 8:08 AM

I’m sorry I don’t understand what you mean, could you please explain a little more.

Technical Support Nov 1, 2011 - 3:42 AM

Please create a 32-bit image list (ILC_COLOR32) and then add an icon to it. You can use the CExtImageList class for that.

Alastair Watts Oct 27, 2011 - 6:13 AM


The icon is loaded using:


hIcon =(HICON)::LoadImage(CoreDLL.hModule, MAKEINTRESOURCE(IDI_DELETE), IMAGE_ICON, 24, 24, 0);


I use this throughout the application and only have issues when using the Prof-UIS API.  DrawIconEx() works just fine!


I understand MFC has a bug when using CImageList and RGBA icons - are image lists used in the command manager?


Technical Support Oct 19, 2011 - 6:28 AM

Please let us know how you are loading your icons.