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 » Ribbon_FileButton icon change Collapse All
Subject Author Date
Andrew Banks Jan 30, 2007 - 5:35 PM

This code correctly puts an icon in the ribbon bar for the file button        
Ribbon_FileButtonGet() ->
            m_iconForLargeMode.m_bmpNormal.
                LoadBMP_Resource( MAKEINTRESOURCE( IDB_BITMAP_SMALL_ICON ) )
        );

if I do anything to change the bitmap for IDB_BITMAP_SMALL_ICON in the ribbonbar example, the entire bitmap paints and there is not button.

I have tried
Ribbon_FileButtonGet() ->
            m_iconForLargeMode.m_bmpNormal.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );

and changed the bitmap to a 255,0,255 backgraound but that does not work.

I just want a new icon for the file button in bitmap format.

How can I do that?

Andrew Banks Feb 3, 2007 - 8:35 AM

When you have time, please answer this. Any edit of the Ribbonbar file button bitmap causes it to paint incorrectly.

Technical Support Feb 5, 2007 - 12:33 PM

The problem may have to do with the fact that not all image editing programs (e.g. S Paint and Adobe Photoshop) can correctly save images as Windows 32-bit bitmaps with alpha channel. The later format is needed for the AlphaBlend() and UpdateWindowLayer() Win32 APIs. We are aware at least of three software items that use 32-bit BMP files: the CExtBitmap and CExtCmdIcon classes in Prof-UIS, Axialis Icon Workshop and MS Office 2007 UI subsystem. The Axialis Icon Workshop provides a plugin for Adobe Photoshop which allows you to export an image to Icon Workshop so you can then save the valid 32-bit BMP file.

You can also use PNG images instead of 32-bit BMP images. The CExtSkinBitmap class in the ProfSkin library allows you to load PNG images. The CExtBitmap objects inside ribbon bar’s command nodes can be assigned from CExtSkinBitmap objects. The PNG image format is lossless (it is ZIPped data containing original bytes of image surface) and can be used to reduce the size of your application. But 32-bit BMPs are loaded faster.