Please explain a resource file

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

bluebird
Posts: 172
Joined: Wed Sep 28, 2016 3:55 am
DBs Used: DBF

Re: Please explain a resource file

Post 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:)
User avatar
apais
Posts: 440
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF
Location: uruguay
Contact:

Re: Please explain a resource file

Post 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
Angel Pais
Web Apps consultant/architect/developer.
HW_apache (webserver modules) co-developer.
HbTron (Html GUI for harbour desktop hybrid apps) co-developer.
https://www.hbtron.com
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Please explain a resource file

Post 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.
Post Reply