ShellExecute 打开网页、目录、邮箱

 1 #include 
 2 #include 
 3 
 4 int WINAPI _tWinMain(HINSTANCE hInstance,
 5                      HINSTANCE hPrevInstance,
 6                      LPTSTR lpCmdLine,
 7                      int nCmdShow) 
 8 {
 9     ShellExecute(NULL,_T("open"),_T("www.baidu.com"),NULL,NULL,SW_SHOWNORMAL);
10     //打开百度
11     ShellExecute(NULL,_T("open"),_T("D:\\1.txt"),NULL,NULL,SW_SHOWNORMAL);
12     //打开目录
13     ShellExecute(NULL,L"open", L"mailto:", NULL, NULL, SW_SHOWNORMAL);
14     ShellExecute(NULL,_T("open"),_T("mailto:[email protected]"), NULL, NULL, SW_SHOWNORMAL);
15     //打开邮箱
16 
17     return 0;
18 }

 

转载于:https://www.cnblogs.com/Open-Source/p/10673616.html

你可能感兴趣的:(ShellExecute 打开网页、目录、邮箱)