Howto Conditionlise strings in stringtable??? 
Author Message
 Howto Conditionlise strings in stringtable???

All I want to do is to build different versions of my app with different
strings in the IDR_MAINFRAME amd IDR_MYAPPTYPE stringtable entries so that
the default document names and window captions can be different for
different customers.

Can anyone tell me how to do this easily?

I have succeded in overiding CMultiDocTemplate so I can force the contents
of m_strDocStrings and I can set the mainframe windowtext in its constructor
but this all seems to complicated.....

Just about everything else is configurable by defining symbols in Project
Configurations and then using either conditional code compilation or
resource condition but not Stringtables!!

Is there a way to do this??

many thanks in advance

Rod



Thu, 18 Sep 2003 20:34:09 GMT  
 Howto Conditionlise strings in stringtable???
just put all the different strings in the string table and load the right
ones explicitly based upon a build variable i would assume when your app
starts


Quote:
> All I want to do is to build different versions of my app with different
> strings in the IDR_MAINFRAME amd IDR_MYAPPTYPE stringtable entries so that
> the default document names and window captions can be different for
> different customers.

> Can anyone tell me how to do this easily?

> I have succeded in overiding CMultiDocTemplate so I can force the contents
> of m_strDocStrings and I can set the mainframe windowtext in its
constructor
> but this all seems to complicated.....

> Just about everything else is configurable by defining symbols in Project
> Configurations and then using either conditional code compilation or
> resource condition but not Stringtables!!

> Is there a way to do this??

> many thanks in advance

> Rod



Thu, 18 Sep 2003 23:28:20 GMT  
 Howto Conditionlise strings in stringtable???


Quote:
> just put all the different strings in the string table and load the right
> ones explicitly based upon a build variable i would assume when your app
> starts

Yeah... Thats one way, but I was trying to avoid loading the app/resource
dll with unwanted strings.
It just seems strange that whilst all the other resources can be
conditionalised, the string table cannot
(at least not with support from the IDE)

any way, thanks for your idea.

Rod.



Sat, 20 Sep 2003 08:17:30 GMT  
 Howto Conditionlise strings in stringtable???
I was waiting to see if another useful solution was suggested. I guess that
nothing really close to what you want has been suggested yet.

One possibility might be to write a littel program you could use in the
Pre-compile build step for the project. There are probably quite a variety
of ways to do that. If it is not absolutely necessary to use resource
strings then you should be able to design something that is easy to use once
it is developed. Your Pre-compile tool could generate either a ".rc" file
that gets included by the resource compiler or a ".h" file that gets
included by the C++ compiler.

Another possibility might be that you could have multiple secondary ".rc"
files that consist only of the conditional strings and such. Then in
someplace such as your ".rc2" file you could conditionally include a
secondary ".rc" file as necessary. As far as I know it is possible to have
multiple ".rc" files in a project; we are so accustomed to having just one
that we do not think to use more than one. Using multiple ".rc" files, you
can still use the resource editor to edit the symbols, right?


Quote:
> All I want to do is to build different versions of my app with different
> strings in the IDR_MAINFRAME amd IDR_MYAPPTYPE stringtable entries so that
> the default document names and window captions can be different for
> different customers.

> Can anyone tell me how to do this easily?

> I have succeded in overiding CMultiDocTemplate so I can force the contents
> of m_strDocStrings and I can set the mainframe windowtext in its
constructor
> but this all seems to complicated.....

> Just about everything else is configurable by defining symbols in Project
> Configurations and then using either conditional code compilation or
> resource condition but not Stringtables!!

> Is there a way to do this??

> many thanks in advance

> Rod



Sat, 20 Sep 2003 08:58:25 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Howto search Stringtable ???

2. Bug: Adding a new string in stringtable creates duplicates in resource.h

3. Stringtable string in MessageBox

4. Using strings from the Resource StringTable

5. Perhaps silly Q: Howto convert a int/long to string

6. Howto interpret method param as verbatim string?

7. HowTo int->string?

8. howto send a string to an application?

9. putting strings in a CEditCtrl - (HOWTO)

10. HowTo?: assigning a char or string with a \u Unicode escape sequence or 0x Hex code

11. HowTo base64 encode a string???

12. HOWTO: Edit/use string resources using VisualStudio.NET IDE

 

 
Powered by phpBB® Forum Software