Article ID: 116212
Article Last Modified on 10/17/2003
IDS_THETEMPLATE = File %1 has some text associated with it.
IDS_THENEWTEMPLATE = File %1 and %1 have associated text.
/* Compile options needed: Default MFC-Windows project options
*/
/////////////////////////////////////////////////////////////////////
// main cpp file
/////////////////////////////////////////////////////////////////////
#include <afxwin.h> // Provide access to MFC
#include "resource.h" // App Studio puts resource ID's here
// myWinApp hooks us into the MFC application processing
class myWinApp : CWinApp
{
public:
BOOL InitInstance();
};
BOOL myWinApp::InitInstance()
{
CString theOutputString;
// This works fine
AfxFormatString1( theOutputString, IDS_THETEMPLATE,
"filename.ext" );
TRACE("theOutputString=%s\n", theOutputString);
// Comment this out to avoid Assertion
AfxFormatString1( theOutputString, IDS_THENEWTEMPLATE,
"filename.ext");
TRACE("theOutputString=%s.\n", theOutputString);
return FALSE; // Terminate the program
}
myWinApp theApp;
/////////////////////////////////////////////////////////////////////
Additional query words: 1.00 1.50 2.00 2.10 2.50 AfxFormatString2
Keywords: kbbug kbfix kbnoupdate kbvc200fix KB116212