473,695 Members | 2,989 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3439
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
1194
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 do it, I can see it, but what I would like to understand better is just when do the individual parts increment. My concern is that I created my last beta version, loaded it with the setup project I created and on those BETA machines, the Build...
3
2339
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 of icons that are built into the file. How do I include the icons in my application for this to work? Thanks
0
1001
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 properties but the result was that the icons that were displayed were all 32bit palleted, having my systems' pallete set to 32bits and the 24bit ones were displayed only when my systems' pallete was set to 16bit. Is there a way to display all the...
2
1291
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 properties but the result was that the icons that were displayed were all 32bit palleted, having my systems' pallete set to 32bits and the 24bit ones were displayed only when my systems' pallete was set to 16bit. Is there a way to display all the...
1
2526
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 will only work on the first icon. I've stumbled upon a class called MultiIcon (http://www.codeproject.com/dotnet/MultiIcon.asp) which allows you to select an individual icon. My problem is how to load the resource into this class. I've added my...
5
2354
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 ugly. Must i use the VS.Net 2003? Is The Framework v1.1 necessary to run VS.Net 2003 program?
8
5207
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. Wasn't sure where to ask.. Thanks,
7
3103
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 as follows: Friend F0 As frmMain Friend F1 As frmStart Friend F2 As frmSearch Then in my ShowPage routine (which is passed a string "pageToShow" which is the name of the form I wish to open), I first check to see if we already have an instance...
1
2219
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 and a real version with the hope someone can help me. Any help would be much appreciated - I would also be happy to pay someone to actually do it if it takes time to work out as I know that its hard when all your help is free :)...
0
8619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
9112
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8971
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8817
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5831
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4336
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4571
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2994
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2258
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.