LPCTSTR AfxGetAppName( ); Return ValueA null-terminated string containing the application’s name.ResThe string returned by this function can be used for diagnostic messages or as a root for temporary string names.Example// Print the application name to the debugger output window.
TRACE("Application name is %s\n", AfxGetAppName());
--------------------------------------------------------------------------------
Send feedback to MSDN.Look here for MSDN Online resources.