Reading Strings from Resource file.

Discussion in 'C++' started by Sabiyur, Dec 21, 2007.

  1. Sabiyur

    Sabiyur Guest

    Hi All,
    The application I am doing requires hundreds of strings to be
    stored & retrieve those randomly.
    I think I can use microsoft resource ".rc" file to store the strings.
    I am not sure, how to write strings in ".rc" file and retrieve it
    programmatically?

    Do you guys have any idea on this?
    Is there any good article on this?

    Please help.

    Thanks
    Sabiyur
    Sabiyur, Dec 21, 2007
    #1
    1. Advertising

  2. Sabiyur

    Ron AF Greve Guest

    Hi,

    Reading:

    http://msdn2.microsoft.com/en-us/library/aa381042.aspx


    Basically. In VS goto the resource view
    expand the treectrl
    Goto string table (or right click to add one).
    Double click it

    On another pane you can now add string resources and there symbolic code
    (which you can use to refer to it in the rest of your code).


    Regards, Ron AF Greve

    http://www.InformationSuperHighway.eu

    "Sabiyur" <> wrote in message
    news:...
    >
    > Hi All,
    > The application I am doing requires hundreds of strings to be
    > stored & retrieve those randomly.
    > I think I can use microsoft resource ".rc" file to store the strings.
    > I am not sure, how to write strings in ".rc" file and retrieve it
    > programmatically?
    >
    > Do you guys have any idea on this?
    > Is there any good article on this?
    >
    > Please help.
    >
    > Thanks
    > Sabiyur
    Ron AF Greve, Dec 21, 2007
    #2
    1. Advertising

  3. Sabiyur

    Ian Collins Guest

    Sabiyur wrote:
    > Hi All,
    > The application I am doing requires hundreds of strings to be
    > stored & retrieve those randomly.
    > I think I can use microsoft resource ".rc" file to store the strings.
    > I am not sure, how to write strings in ".rc" file and retrieve it
    > programmatically?
    >

    Why not just use a simple text file?

    --
    Ian Collins.
    Ian Collins, Dec 21, 2007
    #3
  4. Sabiyur

    Ian Collins Guest

    Ron AF Greve wrote:

    [more top posted off topic advice]

    Please stop top posting off topic advice!

    --
    Ian Collins.
    Ian Collins, Dec 21, 2007
    #4
  5. Sabiyur

    jalina Guest

    Ian Collins a écrit :
    > Sabiyur wrote:
    >> Hi All,
    >> The application I am doing requires hundreds of strings to be
    >> stored & retrieve those randomly.
    >> I think I can use microsoft resource ".rc" file to store the strings.
    >> I am not sure, how to write strings in ".rc" file and retrieve it
    >> programmatically?
    >>

    > Why not just use a simple text file?
    >

    ..rc files are actually text files.
    jalina, Dec 21, 2007
    #5
  6. Sabiyur

    Jim Langston Guest

    jalina wrote:
    > Ian Collins a écrit :
    >> Sabiyur wrote:
    >>> Hi All,
    >>> The application I am doing requires hundreds of strings to be
    >>> stored & retrieve those randomly.
    >>> I think I can use microsoft resource ".rc" file to store the
    >>> strings. I am not sure, how to write strings in ".rc" file and
    >>> retrieve it programmatically?
    >>>

    >> Why not just use a simple text file?
    >>

    > .rc files are actually text files.


    Yes, but not *simple* text files.

    --
    Jim Langston
    Jim Langston, Dec 21, 2007
    #6
  7. Sabiyur

    Sabiyur Guest

    On Dec 20, 4:35 pm, "Ron AF Greve" <ron@localhost> wrote:
    > Hi,
    >
    > Reading:
    >
    > http://msdn2.microsoft.com/en-us/library/aa381042.aspx
    >
    > Basically. In VS goto the resource view
    > expand the treectrl
    > Goto string table (or right click to add one).
    > Double click it
    >
    > On another pane you can now add string resources and there symbolic code
    > (which you can use to refer to it in the rest of your code).
    >
    > Regards, Ron AF Greve
    >
    > http://www.InformationSuperHighway.eu
    >
    > "Sabiyur" <> wrote in message
    >
    > news:...
    >
    >
    >
    >
    >
    > > Hi All,
    > >       The application I am doing requires hundreds of strings to be
    > > stored & retrieve those randomly.
    > > I think I can use microsoft  resource ".rc" file to store the strings.
    > > I am not sure, how to write strings in ".rc" file and retrieve it
    > > programmatically?

    >
    > > Do you guys have any idea on this?
    > > Is there any good article on this?

    >
    > > Please help.

    >
    > > Thanks
    > > Sabiyur- Hide quoted text -

    >
    > - Show quoted text -



    Thanks a lot. The ".rc" file string table works for my application.
    Sabiyur, Dec 22, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.bellatlantic.net

    Reading an resource XML file...

    news.bellatlantic.net, Nov 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    373
    Scott Allen
    Nov 13, 2004
  2. Dirc Khan-Evans
    Replies:
    1
    Views:
    894
    Karl Seguin
    Oct 17, 2005
  3. avishosh
    Replies:
    2
    Views:
    10,570
    avishosh
    Aug 8, 2004
  4. Ben

    Strings, Strings and Damned Strings

    Ben, Jun 22, 2006, in forum: C Programming
    Replies:
    14
    Views:
    756
    Malcolm
    Jun 24, 2006
  5. Heinrich Moser
    Replies:
    1
    Views:
    457
    Heinrich Moser
    Mar 27, 2008
Loading...

Share This Page