Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Menu and 32bpp menu icons
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Menu and 32bpp menu icons

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


Joined: 28 November 2007
Location: United Kingdom
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote kamil Quote  Post ReplyReply Direct Link To This Post Topic: Menu and 32bpp menu icons
    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
 
 
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: 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
Back to Top
kamil View Drop Down
Newbie
Newbie


Joined: 28 November 2007
Location: United Kingdom
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote kamil Quote  Post ReplyReply Direct Link To This Post 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
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: 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
Back to Top
kamil View Drop Down
Newbie
Newbie


Joined: 28 November 2007
Location: United Kingdom
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote kamil Quote  Post ReplyReply Direct Link To This Post Posted: 01 December 2008 at 2:30am
Sorry, it may work only on Vista. I have no WindowsXP around to check it ...
 
Here is my MENUITEMINFO:
 
cItem.cbSize = sizeof(cItem);
cItem.fType = MIIM_BITMAP | MIIM_STRING;
cItem.hbmpItem = hBitmap;
cItem.dwTypeData = "File";
 
 
 
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.453 seconds.