Message Box with printf capability
Posted
by Christian Skovdal Andersen
on August 6th, 1998
Example:
int MsgBox(UINT nType, PSTR sz,...)
{
char ach[512];
va_list args;
va_start(args, sz);
wvsprintf (ach, sz, args); /* Format the string */
int retval = AfxMessageBox (ach, nType == 0 ? MB_OK|MB_ICONEXCLAMATION : nType);
return retval;
}
void main(int argc, char *argv[])
{
MsgBox(MB_OK|MB_ICONINFORMATION, "There are %ld commandline parameters - parameter one is %s", argc, argv[1]);
}
Last updated: 15 May 1998

Comments
There are no comments yet. Be the first to comment!