void AfxFormatString2( CString& rString, UINT nIDS, LPCTSTR lpsz1, LPCTSTR lpsz2 );
Parameters
rString
A reference to the CString that will contain the resultant string after the substitution is performed.
nIDS
The string table ID of the template string on which the substitution will be performed.
lpsz1
A string that will replace the format characters "%1" in the template string.
lpsz2
A string that will replace the format characters "%2" in the template string.
Remarks
Loads the specified string resource and substitutes the characters "%1" and "%2" for the strings pointed to by lpsz1 and lpsz2. The newly formed string is stored in rString. For example, if the string in the string table is "File %1 not found in directory %2", lpsz1 points to "MYFILE.TXT", and lpsz2 points to "C:\MYDIR", then rString will contain the string "File MYFILE.TXT not found in directory C:\MYDIR"
If the format characters "%1" or "%2" appear in the string more than once, multiple substitutions will be made. They do not have to be in numerical order.
See Also AfxFormatString1