void AfxFormatString1( CString& rString, UINT nIDS, LPCTSTR lpsz1 );
Parameters
rString
A reference to a CString object that will contain the resultant string after the substitution is performed.
nIDS
The resource 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.
Remarks
Loads the specified string resource and substitutes the characters "%1" for the string pointed to by lpsz1. The newly formed string is stored in rString. For example, if the string in the string table is "File %1 not found", and lpsz1 is equal to "C:\MYFILE.TXT", then rString will contain the string “File C:\MYFILE.TXT not found”. This function is useful for formatting strings sent to message boxes and other windows.
If the format characters "%1" appear in the string more than once, multiple substitutions will be made.
See Also AfxFormatString2