Thread: Resource file/.rc

  1. #1
    Unregistered
    Guest

    Resource file/.rc

    can someone explain to me what an resource file is? i read about it in the tutorial, but i don't get it.

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    363
    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

  3. #3
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    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...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  2. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  3. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM
  4. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  5. menu resource file
    By satriani in forum Windows Programming
    Replies: 5
    Last Post: 06-08-2002, 10:52 PM