
Saving icons in .ico files (updated to include cursors)
Re: Re:
Glad it worked out.Mr Coder wrote:Thanks srod, works without the Purifier spitting the dummy now.
It was a bit 'slack' of me not to fix the bug earlier since I'd known about it for several months now.
I may look like a mule, but I'm not a complete ass.
Re: Saving icons in .ico files (updated to include cursors)
Hi,
assuming you mean multiple icons as opposed to icons saved in the latest format, then my code will not do that as it stands. However, I seem to recall that Netmaestro posted some code somewhere which will do this. I cannot remember if he based his code on my routine or he started from scratch?
Worth a search through these forums.
assuming you mean multiple icons as opposed to icons saved in the latest format, then my code will not do that as it stands. However, I seem to recall that Netmaestro posted some code somewhere which will do this. I cannot remember if he based his code on my routine or he started from scratch?
Worth a search through these forums.
I may look like a mule, but I'm not a complete ass.
Re: Saving icons in .ico files (updated to include cursors)
As far as I understand it's pretty easy:
- In line 83 you already commented "WriteWord(file,1) ;***CHANGE IF EXTENDING CODE TO MORE THAN ONE ICON***", so this should be changed to the number of to be included icons
- Then simply write the following ICONDIRENTRY, BITMAPINFOHEADER and the data for each icon.
... I didn't test it but it should work.
- In line 83 you already commented "WriteWord(file,1) ;***CHANGE IF EXTENDING CODE TO MORE THAN ONE ICON***", so this should be changed to the number of to be included icons
- Then simply write the following ICONDIRENTRY, BITMAPINFOHEADER and the data for each icon.
... I didn't test it but it should work.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: Saving icons in .ico files (updated to include cursors)
Yes shouldn't be difficult to alter, but I am pretty sure that Netty has already done the job! 

I may look like a mule, but I'm not a complete ass.
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: Saving icons in .ico files (updated to include cursors)
???TODO (maybe!)
; -Extend the code to save multiple icons/cursors in the same .ico file.

Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]