Please explain a resource file

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Posts: 168
Joined: Wed Sep 28, 2016 3:55 am
DBs Used: DBF
Has thanked: 51 times
Been thanked: 7 times

Re: Please explain a resource file

Post by bluebird » Thu Apr 12, 2018 8:41 pm

Thanks to HMG helpers I have finally made rc files work.

It does not seem obvious that you have to replace the files spec ex stopsign.bmp with a name ex. stopme bmp stopsign.bmp
It would have been much easier if there were a tutorial that explained the requirement, not just an example that shows
the content of an rc file.

Is there a reference explaining all files types that HMG uses ?

HMG gives me a lot of pleasure but sometimes frustaration as well, but its worth the effort:)

User avatar
Posts: 324
Joined: Fri Aug 01, 2008 6:03 pm
Location: uruguay
Has thanked: 54 times
Been thanked: 33 times

Post by apais » Thu Apr 12, 2018 9:07 pm

Resources are not an HMG thing.
Not even Harbour.
It's something implemented by the c compiler and its aux tools.
I'm sure google has a lot to say about resources.
In and rc file you can not only store pictures or icons.
Many times it's used in windows programs to store screens.
These screens are created by a program called "resource editor".

Posts: 539
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 142 times
Been thanked: 460 times

Post by edk » Thu Apr 12, 2018 9:29 pm

Typical media types that can be used in controls was listed by Andrés:

It is also possible to use other types, e.g. TXT, RCDATA.
Here is the reference: ... awFile.htm

Personally, I often use TXT (for text files) and RCDATA (for various files), I do not use the others mentioned in the reference, and some do not even know how to use, eg PLUGPLAY or ACCELERATOR.

PS. Note that the "cFileName" parameter is given in reference, which may erroneously suggest the file name. In this case, it is the name of the resource. See the example given in the reference.

Post Reply