std::stringstream ss; ss << path << " - " << ".NET Framework Initialization Error"; std::string strTitle = ss.str(); ss.str(std::string()); ss.clear(); ss << "To run this application, you first must install one of the following versions of the .NET Framework:"; ss << std::endl << " v4.0.30319" << std::endl << "Contact your application publisher for instructions about"; ss << " obtaining the appropriate version of .NET Framework."; std::string text = ss.str(); ::MessageBox(NULL, text.c_str(), strTitle.c_str(), MB_OK | MB_ICONERROR); ss.clear();