Restored from previous forum. Originally posted by Yam.
How can I compile .ico or .bmp inside my exe.
Icon Bitmap inside exe
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Franco.
Normally IncludeBinary is used...
Look also @:
viewtopic.php?t=2149
viewtopic.php?t=549
Have a nice day...
Franco
Normally IncludeBinary is used...
Look also @:
viewtopic.php?t=2149
viewtopic.php?t=549
Have a nice day...
Franco
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by fweil.
Hello Yam,
I guess you mean 'including' an image file in your executable file so that it is not necessary to place the image file itself aside the application.
PureBasic proposes IncludeBinary command to do so.
For example if you have an image file Image.bmp you would like to include in your executable, you can add such commands in your source code :
ImageID = CatchImage(1, ?MyImageFile)
ImageGadget(901, 0, 0, 600, 38, ImageID1)
; ... at the end of your source code
MyImageFile:
IncludeBinary "Image.bmp"
Such code means you include the binary content of the file when compiling inside the executable file, and the compiler will use this binary code as an array when load the image by CatchImage. Then you have just to use this catched image later in you app.
Hope this help.
Francois Weil
14, rue Douer
F64100 Bayonne
Hello Yam,
I guess you mean 'including' an image file in your executable file so that it is not necessary to place the image file itself aside the application.
PureBasic proposes IncludeBinary command to do so.
For example if you have an image file Image.bmp you would like to include in your executable, you can add such commands in your source code :
ImageID = CatchImage(1, ?MyImageFile)
ImageGadget(901, 0, 0, 600, 38, ImageID1)
; ... at the end of your source code
MyImageFile:
IncludeBinary "Image.bmp"
Such code means you include the binary content of the file when compiling inside the executable file, and the compiler will use this binary code as an array when load the image by CatchImage. Then you have just to use this catched image later in you app.
Hope this help.
Francois Weil
14, rue Douer
F64100 Bayonne
-
BackupUser
- PureBasic Guru

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

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

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm