 |
|
 |
Hey this is gr8 , butt i cant Set Iconss on the Fly (on the Run) i mean to say i want to Change the Icon at Runtime from my Harddrive SetIcon"C:\\test.ico") ... like tht.. plzz tell mee how s that possibel !!! plzzzzzzzzzzzz
|
|
|
|
 |
|
 |
Direct and explicit, very handy. :->
Sanity is the greatest peril for genius
|
|
|
|
 |
|
 |
I've made tons of tests but with no success though.
The code shows 4bit (16 colors) tray icon only.
Any ideas?
Thanks a lot.
|
|
|
|
 |
|
 |
yeah.. I'm having the same problem as well.
Anyone can help?
|
|
|
|
 |
|
 |
yeah, i tried everything.. i think the win2k system tray is one of those retardations that got carried over from previous windows versions.
The winxp+ system tray is all new programming since you can have alpha-transparent icons in it... so 24bit images are allowed.
|
|
|
|
 |
|
 |
If I recall correctly, versions of Windows previous to XP display notification icons in something like 16 colors no matter what you try to do.
Even if that's not correct, there are still more issues here. Theoretically, yes, an 8x8 image can have 256 unique colors at most. But, yes, up to 20 are possibly stolen from you by the system (you may be using some of those by coincidence or design). And, you lose 1 for transparency (that may be 1 of the 20...I don't quite remember off the top of my head). So, even right there, there's a difference between a 8x8 icon at 24-bit and 8-bit. Now, the technique for displaying 24-bit icons is identical to displaying 32-bit icons. As we all know, Windows XP finally allows 32-bit icons. So, if we plug in a high-quality, antialiased icon, we'll get nice smooth edges rather than the raggedy, ugly ones we'd get with an 8-bit icon.
I believe that the article's title and content should be updated to show the use of 32-bit icons.
|
|
|
|
 |
|
 |
Isn't the tray icon a 16x16 icon? So you can only have 256 PIXELS - there is a limit on the number of colours from that.
|
|
|
|
 |
|
 |
james
the size of the icon bitmap has nothing to do with the bit-depth of each pixel
"there is no spoon" biz stuff about me
|
|
|
|
 |
|
 |
you're wrong !, each of the 256 pixels can have a 24-bit color pixel. you won't need to display more that 256 color icons, it's completly useless
|
|
|
|
 |
|
 |
listen very carefully and think b4 u answer:
each pixel in ANY bitmap can be 24bit (ie, one of 16.7 million possible colors) as opposed to 8 bit (one of 256 possible colors)
what this means is that u can have nicely shaded icons etc ... admittedly not much use in the big scheme of things but certainly possible
so no ... not wrong
go read some basic grafics books
"there is no spoon" biz stuff about me
|
|
|
|
 |
|
 |
ummmmm maybe u need to go read a basic grafix book too
the number of bits used to represent a pixel on the screen is totally independent of the number of pixels in the image
a 256 color image uses a lookup table to define the colors it can show ... in 256 color made the system takes many of those entries so u dont have complete freedom to define ur own 256 entries
i was an assembly language games programmer for quite a few years so i think i know what im talking about ... unless ive gotten completely stupid lately
??
"there is no spoon" biz stuff about me
|
|
|
|
 |
|
 |
yes but windows takes 20 of them for its system colors
so u only get to define 236 max
"there is no spoon" biz stuff about me
|
|
|
|
 |
|
 |
OK. Let's take it as given that you lose 20 colours (which in XP you don't - apparently). Is it worth increasing to 24bit for the sake of 20 extra available colours? Wouldn't it be a better idea to just tweak the image?
|
|
|
|
 |
|
|
 |
|
 |
I assume this wasn't a discussion with yourself and our erstwhile Mario M. deleted his posts.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
 |
|
 |
no i might be many things but mad enuff to talk to myself isnt one of them
weird
"there is no spoon" biz stuff about me
|
|
|
|
 |
|
 |
"each pixel in ANY bitmap can be 24bit (ie, one of 16.7 million possible colors) as opposed to 8 bit (one of 256 possible colors)"
Do not forget: The 8-bit bitmap comes with a color palette which contains...
...right: 256 entries, each "one of 16.7 million possible colors".
And because accidently the 8-bit icon has as many pixels as color palette entries (16x16=256), EACH pixel can have a different color "of 16.7 million possible colors". So there is really no use for 24-bit tray icons!
Whats more frustrating is the 16-color VGA palette used for tray icons in Win 2000 and before!!
|
|
|
|
 |
|
 |
uhhhhhhhh and the system colors?
that means u lose at least 20 palette entries
so no u dont have enuff to show the thing as it would be in non-256 color mode
"there is no spoon" biz stuff about me
|
|
|
|
 |
|
 |
I can only tell from practice:
WinXP does not complain if you load a palette icon in the tray which does not have the 20 system colors included, nor does XP replace my palette colors with the system colors. It looks just as in the icon editor
If you dynamically create the icon within your application you use a color DDB to draw on. It has a color organisation depending on the current graphics mode, which will be usually your 32 or 24-bit true color resolution. (In Win 2000 this DDB gets converted onto the 16-color VGA palette in WinXP not.) So here there is even no other choice then to use a true-color bitmap! Thats why I do not get the point of the article.
|
|
|
|
 |
|
 |
what you say is complete bull because:
you lose 20 palette entries if AND ONLY IF you're using a paletted 8-bit display mode, in which case there is no way of displaying a 24-bit icon anyway. and don't tell me anybody serious still uses these display modes.
in all other (real-color) display modes, there is no such thing as system palette entries because there is no palette. all colors are represented as their RGB values in video memory, as are the pixels of your icon.
|
|
|
|
 |
|
|
 |
|
 |
Each bitmap pixel contains color ranging from 0 to 2^NoOfBits. i.e an 24 bit bitmap pixels contain color range from 0 to 2^24 but what to say about icons. Do u anticipate the same behaviour from icons having more than 256 colors?
|
|
|
|
 |
|
 |
semmel71 wrote:
Whats more frustrating is the 16-color VGA palette used for tray icons in Win 2000 and before!!
That is not true.
Under windows 98, you can switch the option "Display icons using all possible colors" in Control panel/desktop properties/Effects.
But directories icons are less beautiful with 256 colors, i think.
And with that, icons can be 24 bits !
I programmed a viewer for .jpg files that display a 32x32 24 bits icon, and counted the colors entries for an icon, after printing screen, and found 589 different colors !
I think that for Windows 95, you need microsoft plus to do that.
It is fun to see that a 16x16 24 bits icon is smaller in memory than a 16x16 256 colors (with optimized palette).
|
|
|
|
 |
|
 |
You are right in saying that each pixel can have one of 24/32 bit range colors, but if u get into MSDN, u will see that VC donot allows normal icon loading that contains more than 256 color support.
|
|
|
|
 |
|
 |
Hey, I just thought I'd point out that what he meant was that 16x16 pixels = 256 pixels, so you could have a palette of 256 unique colours and still be covered having a new colour per pixel... thing...
Crayons don't kill people, death does.
|
|
|
|
 |