But other persion use the other windows API to execute windows application instead of "WinExec(...)". That function name is "ShellExecute(...)".
If you want to open web site (www.google.com) with internet explorer, you can write code as followed
::ShellExecute(
NULL,
L"open",
L"http://www.google.com",
L"",
NULL,
SW_SHOWNORMAL);
But if you want open NEW web site in the NEW internet explorer, you can write code as followed
::ShellExecute(
NULL,
L"open",
L"iexplore.exe",
L"http://www.apple.com",
NULL,
SW_SHOWNORMAL);
No comments:
Post a Comment