can someone explain to me what an resource file is? i read about it in the tutorial, but i don't get it.
can someone explain to me what an resource file is? i read about it in the tutorial, but i don't get it.
Well most programmers have become pretty cautious of placing actual data in thier code. This is mainly because if you do it becomes hard to debug and update your code.
This reluctance was around way before windows and if you learnt programming properly then you probbly will have learn't to use global constants, weather using the #define method or const.
Resource files are similar to this.
They are a place where you put most of the data that your program uses to interface with windows.
For example its a place where you can define things like string tables, so that when your programmes run, they load strings out of the resource file similar to having it as a string constant (although it is good to note that it is probbly a lot easier just to use a string constant in your code).
Resource scripts can also be used for a lot more than strings. They hold outlines for menues, descriptions of dialog boxes and even icons and bitmaps.
Really they are just a way to put all the runtime data your program will need and keep it in the same place so you can change and edit it easily. It is also a fair bit easier to make dialog boxes and menues in a resource script than it is ar runtime.
The following link is to a tutorial from the Mingw site that describes most resourcc types pretty well, but i'd warn most ppl against trying to write thier own resource scripts, its long, error prone and only neccessary for cheapo's like me who actually use Mingw and similar such compilers.
http://webclub.kcom.ne.jp/ma/colinp/win32/index.html
The free LCC-Win32 C compiler comes with a GUI resource editor that can be used as a standalone to generate resource scripts.
http://www.cs.virginia.edu/~lcc-win32/
...guess I must be a 'cheapo' too...![]()