How to find and launch the application associated with a file type

if (System::Windows::Forms::MessageBox::Show("Would you like to Open with the Associated Editor?", "Confirm", MessageBoxButtons::YesNo) == System::Windows::Forms::DialogResult::Yes)

{

char resultExecutable[500];

FindExecutable(ToUnmanagedString(pathOutput).c_str(), "", resultExecutable);

String^ associatedApplication = gcnew String(resultExecutable);

associatedApplication = String::Format("\"{0}\"", associatedApplication);

System::Diagnostics::Process::Start(associatedApplication, pathOutput);

}

Ebook Download
View all
Learn
View all