Home All Groups Group Topic Archive Search About

Manipulating a .rc file

Author
24 May 2006 9:08 PM
Patanish
Hi all,

I am trying to manipulate the unicode strings in a .rc file
programatically.
For example, if I want to read the .rc file, and then read the strings
and then manipulate them and save it back (in same or another .rc file)

In .NET there is support using the ResXResourceReader/Writer for the
..ResX files, but nothing for .rc files. Is there any similar way in
..NET or Win32 to work with .rc files??

Thanks in advance!

Author
24 May 2006 10:40 PM
Carl Daniel [VC++ MVP]
"Patanish" <anishpatan***@gmail.com> wrote in message
news:1148504888.796321.300120@j73g2000cwa.googlegroups.com...
> Hi all,
>
> I am trying to manipulate the unicode strings in a .rc file
> programatically.
> For example, if I want to read the .rc file, and then read the strings
> and then manipulate them and save it back (in same or another .rc file)
>
> In .NET there is support using the ResXResourceReader/Writer for the
> .ResX files, but nothing for .rc files. Is there any similar way in
> .NET or Win32 to work with .rc files??

No.  They're just text files - you'll have to write code to parse &
reconstruct the .RC file yourself.

-cd
Author
24 May 2006 11:18 PM
Ben Voigt
Show quote
"Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@mvps.org.nospam>
wrote in message news:u$qhOL4fGHA.5092@TK2MSFTNGP04.phx.gbl...
> "Patanish" <anishpatan***@gmail.com> wrote in message
> news:1148504888.796321.300120@j73g2000cwa.googlegroups.com...
>> Hi all,
>>
>> I am trying to manipulate the unicode strings in a .rc file
>> programatically.
>> For example, if I want to read the .rc file, and then read the strings
>> and then manipulate them and save it back (in same or another .rc file)
>>
>> In .NET there is support using the ResXResourceReader/Writer for the
>> .ResX files, but nothing for .rc files. Is there any similar way in
>> .NET or Win32 to work with .rc files??
>
> No.  They're just text files - you'll have to write code to parse &
> reconstruct the .RC file yourself.

Since the resource compiler supports #include, you can probably save
yourself a lot of effort by moving the strings to a separate file #included
from the first.  Then you won't have to mess with parsing anything expect
the string tables.

Also keeping your strings in a programmer-friendly database (SQL, XML, etc)
for manipulation, then writing an .rc file to be #included might prove to be
easier yet.

Show quote
>
> -cd
>
>

AddThis Social Bookmark Button