Print Page | Close Window

Menu and 32bpp menu icons

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=12789
Printed Date: 22 November 2024 at 11:23pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Menu and 32bpp menu icons
Posted By: kamil
Subject: Menu and 32bpp menu icons
Date Posted: 25 November 2008 at 5:08am
Hi,
I used 32bpp icons in my application. It worked well in standard menus ( background was transparent ) but a black background is drawn in skinned menus ( all images are drawn fine but with a black background ). Here is a simple usage scenario :
 
CImage cImage;
cImage.Load("myimage.png");
MyAlphaPremultiplication( cImage );
HBITMAP hBitmap = image.Detach();
MENUITEMINFO cInfo;
...
cInfo.hbmpItem = hBitmap;
...
InsertMenuItem( ..., &cInfo );
 
Ups, all items have black background ! Is there a way to use 32bpp bitmaps in menus ? 
 
Thanks in advance,
Kamil
 
 



Replies:
Posted By: Oleg
Date Posted: 25 November 2008 at 7:26am
Hi,
Please use our CommandBars instead. They support Alpha icons in all OS not just WindowsXP.


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


Posted By: kamil
Date Posted: 25 November 2008 at 12:20pm
Thanks for the answer,
Do you mean that SkinFramework doesn't support 32bpp icons or there are problems with my system ? Actually I use Windows Vista and I don't expect Windows XP to be any different ( I don't support any other OS'es ). I don't think it would be a big problem to add a transparent icons to skinned menus and it would be a great feature allowing to use skinFramework in existing applications seamlessly.
Converting menus to CommandBars is not straightforward, it is a lot of work and dependencies, changing base classes etc.

Kamil


Posted By: Oleg
Date Posted: 26 November 2008 at 7:22am
Hi,
 
I can't make 32bit icons work with standard menus :( Can you please attach some sample to show what you do.


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


Posted By: kamil
Date Posted: 01 December 2008 at 2:30am
Sorry, it may work only on Vista. I have no WindowsXP around to check it ...
http://shellrevealed.com/blogs/shellblog/archive/2007/02/06/Vista-Style-Menus_2C00_-Part-1-_2D00_-Adding-icons-to-standard-menus.aspx - http://shellrevealed.com/blogs/shellblog/archive/2007/02/06/Vista-Style-Menus_2C00_-Part-1-_2D00_-Adding-icons-to-standard-menus.aspx
 
Here is my MENUITEMINFO:
 
cItem.cbSize = sizeof(cItem);
cItem.fType = MIIM_BITMAP | MIIM_STRING;
cItem.hbmpItem = hBitmap;
cItem.dwTypeData = "File";
 
 
 



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