Date: 2010mar19
Language: C/C++
OS: Windows
Q. How do I use WinExec() ?
A. The documentation says its "obsolete" but its an easy way to launch another
program from your. Some examples...
Launch Notepad (its in your PATH so you don't need specify it its full file name):
WinExec("notepad", SW_SHOWNORMAL);
Launch Windows Calendar:
WinExec("c:\\Program Files\\Windows Calendar\\wincal.exe", SW_SHOWNORMAL);
Check if it failed:
if (WinExec(szFile, SW_SHOWNORMAL) <= 31)
{
MessageBox(... "failed"...);
}
Check if it worked:
if (WinExec(szFile, SW_SHOWNORMAL) > 31)
{
// Worked
}
| What this info useful to you? You can donate to say thanks |
Add a comment
Sign in to add a comment