CString.FormatMessage and CString.Format has the same parameters and
they seems to have to outcome. However, they coexist !. There must be
some subtle different between they.
Can you tell me the difference ?
CString.FormatMessage calls the FormatMessage API
The main difference is the fact that numbers can be associated to parameters:
"You just deleted %d files from the %s folder"
will become
"You just deleted %!1!d files from the %!2!s folder"
The %d %s is also supported.
The FormatMessage is better from internationalization perspective.
In some languages the order in the sentence may require changing the order
of the parameters, like for instance some "Yoda speach":
"From the %s folder %d files you just deleted"
or
"From the %!2!s folder %!1!d files you just deleted"
The first variant is not going to work, since this will require you
to change the order of the parameters.
But the ideal is to keep the code language independent.
FormatMessage does it.