Thread: Resource file

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    411

    Resource file

    My project has a .rc file and it has version information. That file is compiled into the exe right...

    How can I get at the current version number from within the code?

  2. #2
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    Elaborate. Do you mean, open the executable file, and find the version number, or open the .rc file and find the version number, or what?
    [email protected]
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    411
    I want my program to be able to display the current version number.

    Someone runs the program, the main menu appears, on the bottom right corner it says the version number.

  4. #4
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    you should know the version number... you're writing the software... just hardcode it into your program...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  5. #5
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    I think he's saying that he wants to extract data from the resource file that is attached to the end of the executable.

  6. #6

  7. #7
    Registered User
    Join Date
    Aug 2001
    Posts
    411
    well, I have things setup to autpmatically update the version number. So its not a static thing that I can hardcode easily.

    That codeguru page wont load for me, I will try it again later.

  8. #8
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by Eber Kain
    well, I have things setup to autpmatically update the version number. So its not a static thing that I can hardcode easily.
    sure it is... just create a global variable with the version number in it, and before you build it before a release, look up the version number, and increment the build number by one, then build and release... the only thing that you can really increment automatically is the build number anyway, and that's not all that important... most people only pay attention to the major/minor numbers.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  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. resource file problem
    By jjj93421 in forum Game Programming
    Replies: 6
    Last Post: 03-30-2004, 10:58 PM
  5. menu resource file
    By satriani in forum Windows Programming
    Replies: 5
    Last Post: 06-08-2002, 10:52 PM