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. Advertisements

  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. Advertisements

  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. Advertisements

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:
    436
    Scott Allen
    Nov 13, 2004
  2. Dirc Khan-Evans
    Replies:
    1
    Views:
    1,071
    Karl Seguin
    Oct 17, 2005
  3. avishosh
    Replies:
    2
    Views:
    11,117
    avishosh
    Aug 8, 2004
  4. =?Utf-8?B?a3Nlbg==?=
    Replies:
    0
    Views:
    461
    =?Utf-8?B?a3Nlbg==?=
    May 31, 2006
  5. Ben

    Strings, Strings and Damned Strings

    Ben, Jun 22, 2006, in forum: C Programming
    Replies:
    14
    Views:
    1,072
    Malcolm
    Jun 24, 2006
  6. Heinrich Moser
    Replies:
    1
    Views:
    609
    Heinrich Moser
    Mar 27, 2008
  7. Martin Gregorie

    Reading resource files from a jar file

    Martin Gregorie, Feb 12, 2010, in forum: Java
    Replies:
    10
    Views:
    2,107
    John B. Matthews
    Feb 13, 2010
  8. Kenneth P

    Reading values to CSS file from other resource

    Kenneth P, Jan 16, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    228
    Kenneth P
    Jan 16, 2005
Loading...