Re: FormatMessage LoadString from string table
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Mon, 13 Sep 2010 13:54:28 -0400
In re-reading your question, and still trying to figure out what you are asking...
If you want to concatenate a series of strings (separated by spaces, for example) the code
s.LoadString(IDS_STRING_START + i);
result += sep;
result += s;
sep = _T(" ");
Pretty basic programming here.
On Mon, 13 Sep 2010 06:35:47 -0700 (PDT), mfc <mfcprog@xxxxxxxxxxxxxx> wrote:
Hi,Joseph M. Newcomer [MVP]
do you know if there`s a simple / fast solution to add several strings
from the string-table to one CString using FormatMessage?
CString test ("%1%, %2% some other comments %3% and %4%");
for(int i=0; i<MAX_NBR_OF_STR; i++)
test2.LoadString(IDS_TEST_START + i);
I know this solution will not work - but maybe it is possible with a
I don`t want to use 40 CStrings test2[1-40] to load all strings from
the string-table and add them by using FormatMessage.
MVP Tips: http://www.flounder.com/mvp_tips.htm
- Prev by Date: Re: CDocument: load xml and dlls
- Next by Date: Re: FormatMessage LoadString from string table
- Previous by thread: FormatMessage LoadString from string table
- Next by thread: Re: FormatMessage LoadString from string table