473,416 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

multiple program icons problem - VS converts some 32bit icons to24bit

i'm trying to embed multiple program icons in my executable. the only
way so far i managed to do that is to embed native win32 resource file
with multiple icons. it works, but... when i create a native win32
resource file with the VS 2005 and put there my icons, VS always
converts some of the 32bit icons into 24bit - so i loose alpha blending
what makes my icons look ugly.

I did an experiment and created a icon file with full range of icon
sizes and color depths. all from 4bit through 8bit, 24bit to 32bit and
with all standard sizes from 16x16 to 64x64. i thought that maybe the
icon is converted because it does not have one of the required
versions... that did not help. after importing icon file to the win32
res file 32x32 32bit icon was converted to 24bit despite the file
already contained the 32x32 24bit version of that icon.

so my question is how can i put icon files into win32 res file and
prevent VS from converting them from 32bit to 24bit? or maybe there is
some other way to embed multiple program icons into my executable?

to create the win32 native resource file i use VS 2005 Native resource
template (File -New -File -General -Native Resource Template).
Jul 27 '06 #1
2 3422
I don't know if this will solve your problem about 32 to 24 bits, but I do
multiple icons differently. I add each .ico file to the project (Project,
Add Existing Item), and set each Build Action to Embedded Resource. The
icons are added to the exe at build time. At runtime, I can change the icon
of form(s) by creating an Icon object from the running assembly and assigning
it to the form(s) I want. During these evolutions, I don't make a win32
resource file - my starting point is several .ico files. I use simple minded
766 byte .ico files, so I don't know if the above procedure will work for
your icons. My guess is that it will work ok.
i'm trying to embed multiple program icons in my executable. the only
way so far i managed to do that is to embed native win32 resource file
with multiple icons. it works, but... when i create a native win32
resource file with the VS 2005 and put there my icons, VS always
converts some of the 32bit icons into 24bit - so i loose alpha blending
what makes my icons look ugly.

I did an experiment and created a icon file with full range of icon
sizes and color depths. all from 4bit through 8bit, 24bit to 32bit and
with all standard sizes from 16x16 to 64x64. i thought that maybe the
icon is converted because it does not have one of the required
versions... that did not help. after importing icon file to the win32
res file 32x32 32bit icon was converted to 24bit despite the file
already contained the 32x32 24bit version of that icon.

so my question is how can i put icon files into win32 res file and
prevent VS from converting them from 32bit to 24bit? or maybe there is
some other way to embed multiple program icons into my executable?

to create the win32 native resource file i use VS 2005 Native resource
template (File -New -File -General -Native Resource Template).
Jul 27 '06 #2
that's not the solution for me. i do not need these icons inside my
application. they are there for users, for shortcuts or associated files
icons so i could avoid distributing separate icon files with my app.
AMercer wrote:
I don't know if this will solve your problem about 32 to 24 bits, but I do
multiple icons differently. I add each .ico file to the project (Project,
Add Existing Item), and set each Build Action to Embedded Resource. The
icons are added to the exe at build time. At runtime, I can change the icon
of form(s) by creating an Icon object from the running assembly and assigning
it to the form(s) I want. During these evolutions, I don't make a win32
resource file - my starting point is several .ico files. I use simple minded
766 byte .ico files, so I don't know if the above procedure will work for
your icons. My guess is that it will work ok.
>i'm trying to embed multiple program icons in my executable. the only
way so far i managed to do that is to embed native win32 resource file
with multiple icons. it works, but... when i create a native win32
resource file with the VS 2005 and put there my icons, VS always
converts some of the 32bit icons into 24bit - so i loose alpha blending
what makes my icons look ugly.

I did an experiment and created a icon file with full range of icon
sizes and color depths. all from 4bit through 8bit, 24bit to 32bit and
with all standard sizes from 16x16 to 64x64. i thought that maybe the
icon is converted because it does not have one of the required
versions... that did not help. after importing icon file to the win32
res file 32x32 32bit icon was converted to 24bit despite the file
already contained the 32x32 24bit version of that icon.

so my question is how can i put icon files into win32 res file and
prevent VS from converting them from 32bit to 24bit? or maybe there is
some other way to embed multiple program icons into my executable?

to create the win32 native resource file i use VS 2005 Native resource
template (File -New -File -General -Native Resource Template).
Jul 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mts | last post by:
First, let me say that I hope I have selected the correct discussion group for these questions. I would like to display the version (major.minor.build) of my project in the final build. I can...
3
by: SlasherStanley | last post by:
I have wrote a c# app and included the default app.ico file and then compliled it. When I create a shortcut to the application on the destop, I would like the option of selecting from a choice...
0
by: pnp | last post by:
I want to display in a form all the icons of an icon file, that has icons with both 32bit colordepth and 24bit colordepth, simultaneously. I tried using ImageLists with different colordepth...
2
by: pnp | last post by:
I want to display in a form all the icons of an icon file, that has icons with both 32bit colordepth and 24bit colordepth, simultaneously. I tried using ImageLists with different colordepth...
1
by: Jake Wharton | last post by:
Right now i have embedded an icon file in my project with 6 different individual icons in it. I currently use Bitmap icon = new Bitmap(this.GetType(), "App.ico"); to load in the icon but it...
5
by: yxq | last post by:
Hello I am using VS.Net 2002, my icons of XP type look ugly, and i have saw the article. i have added the manifest file. Sometime the icons show very good, but sometime the icons look very...
8
by: Shane Story | last post by:
I would like to embed mutiple icons inside my main exe file so that they can be viewed like Shell32.dll or whatever. Can't figure out how to do this. Sorry if this is in the wrong group. ...
7
by: Siv | last post by:
Hi, I have an MDI application that uses a generic "ShowPage" routine in a module that is called when I want to display a child form. The basic idea is that in the module I have declared each form...
1
by: Vivienne | last post by:
Hi there This is a hard problem that I have - I have only been using sql for a couple of weeks and have gone past my ability level quickly! The real tables are complex but I will post a simple...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.