Thread: .rc files in VC8

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    100

    Question .rc files in VC8

    Hello, I have been reading a book and its accompanying CD about how to program video games in Windows for beginners. In one of the appendices on the CD's side of the literature, there was a skeleton example of a Windows program that used super basic resources: specifically just a large icon and a small icon resource.

    The trouble was, the author only programmed/included those resources using a header file and a resource file (Resource.h and Skeleton.rc, respectively). In the .rc file, he typed in two lines of stuff and nothing else - no pictures or anything. However when I was trying to copy his program using VC8, the problem that I ran into was I could not figure out how to do that with a .rc file.

    When I would go in to try to make a new .rc file, first it would make a folder for such things, and then when I would get VC8 to actually make such a file, I could not figure out how to make the file such so that I could simply type stuff in. I saw all these type options, like Bitmap and stuff, but nothing like what the author is using.

    __________________________________________________ __________
    How do I do that using VC8? The book comes with a free compiler, which the author said copying that example would be easier on, but VC8 is what I'm interested in learning this stuff on.
    __________________________________________________ __________

    To help clarify what he was using, I shall show you the contents of the two resource-oriented files:

    Resource.h ==
    Code:
    //————————————————————————————————-
    // Icons Range : 1000 - 1999
    //————————————————————————————————-
    #define IDI_SKELETON 1000
    #define IDI_SKELETON_SM 1001
    Skeleton.rc ==
    Code:
    //————————————————————————————————-
    // Include Files
    //————————————————————————————————-
    #include “Resource.h”
    //————————————————————————————————-
    // Icons
    //————————————————————————————————-
    IDI_SKELETON ICON “Res\\Skeleton.ico”
    IDI_SKELETON_SM ICON “Res\\Skeleton_sm.ico”
    ----both files provided by the book and CD of Beginning Game Programming by SAMS


    Again my question is how to make a Skeleton.rc file to match his, using VC8. The problem was I couldn't figure out how to generate such a file that I could type into.


    Thanks!!!

  2. #2
    Registered User
    Join Date
    Dec 2005
    Posts
    118
    im not sure if this will work but try changing the .rc to .cpp
    although i have no windows programming experience so i may be very wrong?

  3. #3
    Registered User
    Join Date
    Aug 2004
    Location
    San Diego, CA
    Posts
    313
    In your Solution Explorer, right click on the Resource Files folder. Go to Add, then New Item. Select the category Resource, then pick Resource File.

    That'll do the automagical inclusion for you. Other than that, your .rc file looks fine, from what I understand.

  4. #4
    Registered User
    Join Date
    May 2006
    Posts
    100

    clarification of the problem

    I was able to figure out that much, but what would then happen would be that VC8 would just add a folder there, and only let me add resources to that folder. I can't figure out how to instead make it into something that I can type in.

  5. #5
    Registered User
    Join Date
    Dec 2007
    Posts
    214
    In the Solution Explorer, right click on the .rc file and in the pop up menu select View Code.

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I don't think the Express edition supports RC files...
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Registered User
    Join Date
    May 2006
    Posts
    100
    That seemed to work. Thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Error opening files in a different dir
    By Ozzie in forum C++ Programming
    Replies: 3
    Last Post: 10-09-2008, 06:55 AM
  2. .rc files problem
    By RevengerPT in forum C Programming
    Replies: 3
    Last Post: 12-09-2005, 11:38 AM
  3. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 02:41 PM
  4. Folding@Home Cboard team?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 398
    Last Post: 10-11-2005, 08:44 AM
  5. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM