If you peek in Microsoft (and other) applications, you will see multiple
icons of differing sizes and palettes all under the same title. I want the
MAINICON resource to hold two icons. Is this possible? ....or didn't they
think it was important?
Regards: L.J. * UK (lee@*nospam*.cafe-society.com)
Good luck,
G. Jacobs
Application.Initialize;
Application.CreateForm(TForm1, Form1);
case GetDeviceCaps(GetDC(Form1.Handle), HORZRES) of
640 : Application.Icon.Handle := LoadIcon (hInstance, 'ICON640');
800 : Application.Icon.Handle := LoadIcon (hInstance, 'ICON800');
1024 : Application.Icon.Handle := LoadIcon (hInstance, 'ICON1024');
1280 : Application.Icon.Handle := LoadIcon (hInstance, 'ICON1280');
end;
Application.Run;
Thanks but that's not at all what I want to do. When explorer displays your
file, it jumps to the first icon resource and displays it.
However, if you look at a Microsoft exe (ie. notepad, etc.) you will notice
that under a single ResID, there are multiple icons. When Windows finds a
multiple instance, it grabs the one nearest to the current viewer size and
resolution. Your application doesn't decide because it hasn't even been
executed!
I have since found that these ResIDs which appear to contain Icons of
different sizes actually turn out to be a single icon file, but they contain
multiple icon bitmasks of different sizes. OK, I extracted one of these
'multiple icon' files and put it in my D3 project as the main icon. It
worked! Windows displayed the 16x16 icon provided when explorer was in
small icons mode and the 32x32icon provided when it was in large icons mode.
The problem? Well, I want to use my own icons but I can't put them together
because I can't find a shred of documentation. I've taken the 'supericon'
file apart but can't even find how the multiple bitmasks have been included
because they appear to be garbled.
If anyone knows where info can be found on these icons, I'd be grateful for
the info. Cheers: L.J.*UK lee@*nospam*cafe-society.com
L.J. wrote in message <6p7jdm$pr...@forums.borland.com>...
Use the image editor that came with delphi. you can store multiple images
in one file.
Respectfully,
--
Tony C. Wang
Professional Dental Technologies
L.J. wrote in message <6p7jdm$pr...@forums.borland.com>...
>Hi:
>
>Thanks but that's not at all what I want to do. When explorer displays
your
>file, it jumps to the first icon resource and displays it.
>
>However, if you look at a Microsoft exe (ie. notepad, etc.) you will notice
>that under a single ResID, there are multiple icons. When Windows finds a
>multiple instance, it grabs the one nearest to the current viewer size and
>resolution. Your application doesn't decide because it hasn't even been
>executed!
>
>I have since found that these ResIDs which appear to contain Icons of
>different sizes actually turn out to be a single icon file, but they
contain
>multiple icon bitmasks of different sizes. OK, I extracted one of these
>'multiple icon' files and put it in my D3 project as the main icon. It
>worked! Windows displayed the 16x16 icon provided when explorer was in
>small icons mode and the 32x32icon provided when it was in large icons
mode.
>
....really? You must tell me how you store multiple icons of differing
sizes in a single .ico file. Particularly with Image Editor which hasn't
been updated since the stone age.
I have a hnd in graphic design, yet I can't find a single tool which will
'join' these icons of different sizes into a single .ico file.
Regards:
L.J.
Load Image Editor
File|New|Icon file
From the Icon properties dialog, select either 16x16 or 32x32 and the
appropriate color density
From the "Icon1.Ico" dialog press the New button.
Draw icons
Save file
The ico file will contain both icons.
--
Regards
Ralph (TeamB)
Herrsching, Germany
L.J. wrote in message <6p9def$rj...@forums.borland.com>...
My only quibble is that it doesn't have a Stretch function,
so I had to copy and paste with Photoshop to shrink the
48x48 image down to the smaller sizes.
Otherwise terrific program.
--
J. R. Fitch
Nine Dragons Software
351 Ulloa Street
San Francisco,
California 94127
415.664.3474 v.
415.564.3161 f.
www.ninedragons.com
jrf...@ninedragons.com
If you want to do your own, you can probably find the format for the icons
on Microsoft's site. A lot of icon-related stuff isn't documented very well,
if at all, however.
L.J. wrote in message <6p7jdm$pr...@forums.borland.com>...
I haven't tried it yet but I'll take your word for it. I didn't think image
edit would be capable. I tried but got nowhere.
I'm using Microangelo now, but I've a little more faith in that thing I
called 'stone age' now!
Cheers & thanks! L.J.
>>Use the image editor that came with delphi. you can store multiple images
>>in one file.
>
>
>....really? You must tell me how you store multiple icons of differing
>sizes in a single .ico file. Particularly with Image Editor which hasn't
>been updated since the stone age.
>
>I have a hnd in graphic design, yet I can't find a single tool which will
>'join' these icons of different sizes into a single .ico file.
It used to be via the API and IconDir and IconDirEntry, but I no
longer see it in the Win32 API. I have the types in an old API
reference manual if they'd do you any good...
JE McTaggart