Thread: Resources

  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    104

    Resources

    I have seen a few tutorials on how to make GUI and in all of them they require you to build a resource file (.rc).

    So here are my questions: (PS. I HAVE searched for answers and cant find.)

    1. What is the actual use of using a resource file? What are the advantages?
    2. Is this considered a scripting language? If so, does it vary per compiler?
    3. Do some types of applications (such as GUIs) strictly require the use of resources? If not, then what would be the substitute for this?
    4. Exactly what relation do resources have with your actual program? Do you link it to your program (using a respective linker) or do you 'include' it in some way?

    Thanks in advanced.

    P.S. A link to a website with information on resources would be useful.

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by abraham2119 View Post
    (PS. I HAVE searched for answers and cant find.)
    Perhaps because your questions are not as important to your task as you think. I've done lots of GUI programming (but not on windows) and the whole "resource file" issue looks pretty trivial, I very much doubt there is something you need to know about it that you will not discover by just working through a GUI programming tutorial that you like, and trying to write simple programs that work.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  3. #3
    Registered User
    Join Date
    Dec 2008
    Posts
    104
    Quote Originally Posted by MK27 View Post
    Perhaps because your questions are not as important to your task as you think.
    Yes, but when programming, I like to understand everything I am doing; not write code that I don't understand. Therefore, I asked this questions.

  4. #4
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Most people do not interact with resource files that much because popular IDEs do all the work for you. In MSVC++, you can use a window designer to specify things like window sizes, locations, and static text. This gets saved into the resource file, and a resource.h header file is generated for you.

    Resource files are not required, they just make life a little easier (sometimes). If you really want to understand everything that is going on with windows programming, I suggest that you don't use resource files.

  5. #5
    Registered User
    Join Date
    Dec 2008
    Posts
    104
    Quote Originally Posted by bithub View Post
    Most people do not interact with resource files that much because popular IDEs do all the work for you. In MSVC++, you can use a window designer to specify things like window sizes, locations, and static text. This gets saved into the resource file, and a resource.h header file is generated for you.

    Resource files are not required, they just make life a little easier (sometimes). If you really want to understand everything that is going on with windows programming, I suggest that you don't use resource files.
    Thanks for your response. Therefore, what would be the substitute for resource files?

  6. #6
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Thanks for your response. Therefore, what would be the substitute for resource files?
    Code. There is a code equivalent using the win32 API for everything a resource file can do.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. measuring system resources used by a function
    By Aran in forum C Programming
    Replies: 1
    Last Post: 03-13-2006, 05:35 PM
  2. Storing resources into a single file
    By LuckY in forum Game Programming
    Replies: 20
    Last Post: 08-14-2004, 11:28 PM
  3. GlobalMemoryStatus to get "system resources free&
    By hanhao in forum Windows Programming
    Replies: 0
    Last Post: 03-20-2004, 02:30 AM
  4. Adding resources
    By nima_ranjbar in forum Windows Programming
    Replies: 0
    Last Post: 04-14-2002, 11:36 PM
  5. Dialogs and resources
    By SushiFugu in forum Windows Programming
    Replies: 6
    Last Post: 01-23-2002, 02:05 PM