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 » Using 24-bits (True Color) CExtToolControlBar Collapse All
Subject Author Date
Daniel Verret Feb 3, 2010 - 7:56 AM

It is possible to display a true color (24 bits) toolbar with CExtToolControlBar ? 


Right now I need to downgrade to 256 colors to be able to see my toolbar.


Thank you.

Technical Support Feb 4, 2010 - 1:51 PM

You can send us e-mail to the support mail box at this web site. But we already know what’s wrong with your BMP file. It’s not transparent. Any Photoshop version saves BMP files without alpha channel or with 255 value in each alpha value of each BMP pixel. There are three ways to load images with alpha channel into Prof-UIS based app:

1) Save PNG file in Photoshop. Open it in MSPAINT.EXE. It will display trash instead of transparent or semi-transparent pixels. This is not a problem. You should just save it as 24 bit per pixel BMP. The saved BMP file will really use 32 bit per pixel format and correct alpha values in each pixel’s data. This works only with MSPAINT.EXE provided with Windows XP and running on 24/32-bit video modes on the desktop. The MSPAINT.EXE of Windows Vista and Windows 7 save non-transparent BMP file.

2) Save PNG file in Photoshop. Use tools like Axialis Icon Workshop or other which can really save BMP file with transparency.

3) Save PNG file in Photoshop. Use PNG files in your app instead of BMP files. Prof-UIS library does not support PNG. But the ProfSkin library supports this format. The CExtBitmapSkin class in the ProfSkin library is derived from the CExtBitmap class and provides additional features like PNG format loading/saving including file system’s files, CFile / CArchive streams, binary PNG resource sections.

Technical Support Feb 3, 2010 - 12:08 PM

None of the Visual Studio versions does allows you to specify toolbar button images based on larger than 8 bits per pixel color. You should create your toolbar resources using 8 or 4 bits per pixel bitmaps. Then you should find the toolbar’s .bmp file in the res subfolder of your project and replace it with more colored bitmap based on 15, 16, 24 or 32 bits per pixel formats. Prof-UIS will automatically use this new colored bitmap. But you will not be able to edit the toolbar in your Visual Studio. If you will need to add some new button into your high color toolbar, then you should edit it somewhere outside Visual Studio and edit toolbar resource’s text manually.

Daniel Verret Feb 3, 2010 - 12:40 PM

What you said is exactly what I did, I replaced the .bmp in the res folder.  the problem is when I run my application the toolbar button are there but invisible in 24 bits and when I use an 8 bits version of the .bmp they appear. I can click on them, they are just transparent.


Now I understand that Profuis support pixel formats up to 32 bits.  but do you have any idea why my 24 bits toolbar become transparent when i run my apps?


By the way I know the limitation of Visual Studio about displaying and editing bitmap and icon.

Daniel Verret Feb 3, 2010 - 1:02 PM

Ok, forget it, i just found the problems...the BMP was save in A8-R8-G8-B8 instead of R8-G8-B8...unfortunately profuis do not support an alpha channel in the bitmap.

Technical Support Feb 4, 2010 - 5:55 AM

Prof-UIS fully supports 32-bit BMP format with alpha channel. We even can alpha blend such bitmaps when running on Windows 95. You can send us your problematic bitmap file and we will check what’s wrong. Which tool or editor did you used for creating your 32-bit BMP file?

Daniel Verret Feb 4, 2010 - 10:00 AM

The BMP was made using photoshop.  How can I send it to you?  Is there a way to attached it?  Or do I need to send it to you be email?