.exe icon?
BlitzMax Forums/BlitzMax Programming/.exe icon?
| ||
I've seen this in some bmx files:?Win32 Import "resources/resources.o" ? I guess this have to do with the .exe icon, or am I wrong? If it is, how do I create those .o files? When I look in the resource directory, there is a file called resources.rc with all the information about which icon to use, and there is also a .bat file to create the .o file but it doesn't work compile.bat: windres -o resources.o resources.rc resources.rc: #define RT_MANIFEST 24 #define MANIFEST_ID 1 #define MAIN_ICON_ID 101 MAIN_ICON_ID ICON "main_icon.ico" Help me out here. I hate the default icon :) ResHack or such is way too advanced for a stupid dude like me.... ;) |
| ||
Keep the .ico and .rc file in the same directory, copy windres from your mingw/bin directory to that directory and then create a bat file with this content: Try that ^^ |
| ||
Oh... I didn't have MiniGW... Downloading and trying.. Thanks!! =) |
| ||
Here's a small app you that I use for .ico => .o compilation :) Change WINDRESPATH to the path of your windres.exe file => Compile the code, and then just drag the .rc (or .ico) over the compiled exe and it'll become a .o file with the same filename :) |
| ||
My way to integrate an icon is: 1. You need to have any "*.o"-file. Name this "icon.o", and put it into the path of your "*.bmx"-file. 2. Add this lines to your code: ?Win32 Import "icon.o" ? Compile your application. Now you have a wrong icon associated wih the application. 3. Use free "IcoFX.Exe" (www.icofx.ro) to transform any image to a "*.ico"-file and save it as "NewIcon.Ico". 4. In IcoFX you have the possibility to change icons, which are already inside "*.exe"-files. So you can open your application in IcoFX with "menu - tools - resource editor", click on the "wrong" icon and on the symbol "change". In a window you can select your "NewIcon.Ico". Thats all. |
| ||
...or use BlitzIcon that simply do the job... Freeware app, coded with Blitzmax. http://landzone.free.fr/blitzicon.htm |
| ||
If I would like to define a icon for a file that should be associated with my software, how do I define that in resources.rc before compiling it? Is it as simple as this? #define MAIN_ICON_ID 101 #define FILE_ICON_ID 102 MAIN_ICON_ID ICON "main_icon.ico" FILE_ICON_ID ICON "file_icon.ico" ? |
| ||
http://blitzbasic.com/Community/posts.php?topic=72899 |
| ||
That changes the icon of my .exe, which is already done... I'm looking for a way to define a icon for files that opens with my .exe |
| ||
Never could understand why this seemingly simple detail was left out of the BlitzMax IDE... Russell |
| ||
I'm looking for a way to define a icon for files that opens with my .exe Well, basically, the best way is a thing called file association:- http://msdn.microsoft.com/en-us/library/cc144158(VS.85).aspx Obviously, the above is for Windows, I havent the foggiest on Mac or Linux. Dabz |