shellexecute用法 C語言shellexecute函數(shù)的用法?
C語言shellexecute函數(shù)的用法?Shellexecute(hWnd hWnd,//父窗口handle lpcstr lpoperation,//操作類型lpcstr lpfile,//操作l
C語言shellexecute函數(shù)的用法?
Shellexecute(hWnd hWnd,//父窗口handle lpcstr lpoperation,//操作類型lpcstr lpfile,//操作lpcstr lpparameters的文件或路徑,//當(dāng)lpoperation為“explore”時,指定要傳遞的參數(shù),通常設(shè)置為nulllpcstr lpdirectory,//指定默認(rèn)目錄,通常設(shè)置為nullint nshowcmd//示例如下://調(diào)用計算器shellexecute(null,“open”)”計算.exe“,NULL,NULL,SWushownormal)//調(diào)用記事本shellexecute(NULL,”open“”記事本.EXE“,NULL,NULL,SW Function函數(shù):你可以給它任何文件的名稱,它可以識別并打開它。2函數(shù)原型:hinstanceshellexecute(hwndhwnd,lpctstrlpoperation,lpctstrlpfile,lpctstrlpparameters,lpctstrlpdirectory,intnshowcmd)3。參數(shù)說明:hWnd:用于指定父窗口句柄。當(dāng)函數(shù)調(diào)用期間發(fā)生錯誤時,它將充當(dāng)windows消息窗口的父級。Lpoperation:用于指定要執(zhí)行的操作?!啊按蜷_”操作是執(zhí)行l(wèi)pfile參數(shù)指定的程序,或打開lpfile參數(shù)指定的文件或文件夾;“打印”操作是打印lpfile參數(shù)指定的文件;“瀏覽”操作是瀏覽lpfile參數(shù)指定的文件夾。