Please explain a resource file

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

bluebird
Posts: 148
Joined: Wed Sep 28, 2016 3:55 am
DBs Used: DBF
Has thanked: 40 times
Been thanked: 6 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
apais
Posts: 268
Joined: Fri Aug 01, 2008 6:03 pm
Location: uruguay
Has thanked: 31 times
Been thanked: 21 times
Contact:

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".
HTH
Angel

edk
Posts: 282
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 76 times
Been thanked: 225 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:
WAVE * .WAV
JPG * .JPG
BITMAP * .BMP
JPG * .JPG
GIF * .GIF
TIF * .TIF
PNG * .PNG
WMF * .WMF
ICO * .ICO
CUR * .CUR

It is also possible to use other types, e.g. TXT, RCDATA.
Here is the reference: http://hmgforum.com/hmgdoc/data/HMG_Loa ... 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