Interactive PowerBasic Forum

IT-Consultant: Charles Pegge => OxygenBasic Examples => Topic started by: Roland Stowasser on February 03, 2024, 09:46:40 PM

Title: Small Error in AppIcon.rc
Post by: Roland Stowasser on February 03, 2024, 09:46:40 PM
Hi Charles,

in \demos\WinDynDialogs\ExeWithRes the file AppIcon.rc must be modified in line 6:

1001 BITMAP DISCARDABLE "..\..\..\demos\!ProjB\SDL\bmp\kurbis.bmp"

otherwise the .res file will not be created correctly. When I created the .rc file I was a bit lazy and wanted to avoid storing the same files.
Title: Re: Small Error in AppIcon.rc
Post by: Charles Pegge on February 04, 2024, 12:15:16 AM
Thanks Roland,

Do you want the same relative location for item 1000?

' 1000 Icon   "c:\OxygenBasic\tools\oxicon.ico"
' 1001 BITMAP DISCARDABLE "..\..\..\demos\!ProjB\SDL\bmp\kurbis.bmp"
Title: Re: Small Error in AppIcon.rc
Post by: Roland Stowasser on February 04, 2024, 01:24:49 AM
Oh right - I see that I forgot to correct the path in line 4. But line 3 and line 4 should be seen as comments anyway and I tried to build the relative paths. So  the first 6 lines should be:

LANGUAGE 0,0

//1000 ICON DISCARDABLE  "c:\OxygenBasic\tools\oxicon.ico"
//1001 BITMAP DISCARDABLE "c:\OxygenBasic\demos\!ProjB\SDL\bmp\kurbis.bmp"
1000 ICON DISCARDABLE  "..\..\..\tools\oxicon.ico"
1001 BITMAP DISCARDABLE "..\..\..\demos\!ProjB\SDL\bmp\kurbis.bmp"

...
Title: Re: Small Error in AppIcon.rc
Post by: Roland Stowasser on February 06, 2024, 11:09:00 AM
Hi Charles,

I noticed that you added in co2.exe the option to add a recource.res file to a compiled exe file. I haven't tried this yet, but of course it's fantastic. Theoretically it should also be possible to compile a .rc file to a .res file and add it to the .exe file with the option to use a different resource compiler if not using GoRc? (Just a mind game).
Title: Re: Small Error in AppIcon.rc
Post by: Roland Stowasser on February 06, 2024, 11:38:30 AM
After further consideration, I have come to the conclusion that the .rc option is overkill. But I had already posted my message at that point.
Title: Re: Small Error in AppIcon.rc
Post by: Charles Pegge on February 07, 2024, 10:47:26 AM
I have considered integrating an RC compiler into o2, but that is a major project for a fairly specialized operation, which GoRC handles very well in a compile/build cycle.

However the RC syntax is quite interesting.