Icon Resource Maker (icons inside PB exes)

Developed or developing a new product in PureBasic? Tell the world about it.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Justin.

This tool will let you include icons inside your exes, and use them with any gadget that support images. it was not possible since now.

the program will create a resource file from an .ico file, then you can use includebinary with the res file and 2 api calls to get the icon handle.

see the readme and example.pb.

it's done in PB, using a dialog (10kb uncompressed).

right click and save or paste the link into a download manager:
http://angelfire.lycos.com/amiga2/pbwin ... ker1.0.zip
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by freak.

Thanks, this is really useful!

Timo
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Justin.

I realized that only one api call is needed to get icon handle, in the example.pb:

hicon=CreateIconFromResource_(?icon,resfilesize,#true,196608) ;don't touch the last parameter

i'll update it later, maybe with cursors support.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by gnozal.

Thank you very much.
Something I was missing.
I used this very often with RapidQ :
 $RESOURCE ICON AS "Icon.ico"
 Object.IcoHandle = ICON
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Berikco.

CatchImage() will support icons in next PB release i believe, I read it on IRC

Regards,

Berikco

http://www.benny.zeb.be/purebasic.htm
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Jose.

Cool stuff, Justin
Thanks
Jose

Registered PureBasic User
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Justin.

If Catchimage will support icons is good, but it's a big lib, i like small exes. if i had to use Catchimage only for icons i would choose my method.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> hicon=CreateIconFromResource_(?icon,resfilesize,#true,196608) ;don't touch the last parameter

The parameter description for this number is DWORD dwVer and after some checking I found
that the required constant is #VOS_OS232. So if you prefer to use constants in API calls,
then this is the one to use! :)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Justin.

Thanks PB, i'll use it. at the function description there was only the hex value.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.
If Catchimage will support icons is good, but it's a big lib, i like small exes. if i had to use Catchimage only for icons i would choose my method.
Yes, its a big lib and i am a verrrry big fan of small executeables too! So i would be really like to see that Fred will add an info to the pure docs or mark the docs with a special symbol i.e. if the actual lib is complete splitted or not... On this way every user here know if he can use the one or other pure command without to link a full not splitted lib... Sorry for my bad explaining here, but hope you understand what i mean... I would like to see ALL (!) libs splitted and mark this in the docs with a special symbol i.e. - what do you think about this?

I want this since very looooooooong time. greetz

greetz
MrVainSCL! aka Thorsten

PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX9.0, SB AWE64, Win2000 + all Updates...
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

All the libs will be splitted and the image on is actually is. In fact, 80% of the libs are splitted and the last one will follow soon.

Fred - AlphaSND
Post Reply