Page 2 of 2

Re: Please explain a resource file

Posted: Thu Apr 12, 2018 8:41 pm
by bluebird
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:)

Re: Please explain a resource file

Posted: Thu Apr 12, 2018 9:07 pm
by apais
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

Re: Please explain a resource file

Posted: Thu Apr 12, 2018 9:29 pm
by edk
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.