文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > ShellExecute的用法
侵权投诉

ShellExecute的用法

ShellExecute的用法

ShellExecute(this->m_hWnd,"open","calc.exe","","", SW_SHOW ); 或

ShellExecute(this->m_hWnd,"open","notepad.exe",

"c:\\MyLog.log","",SW_SHOW );

As you can see, I haven't passed the full path of the programs.

Q: 如何打开一个同系统程序相关连的文档?

ShellExecute(this->m_hWnd,"open",

"c:\\abc.txt","","",SW_SHOW );

Q: 如何打开一个网页?

ShellExecute(this->m_hWnd,"open",

"doc.guandang.net;, SW_SHOW );

Q: 如何激活相关程序,发送EMAIL?

ShellExecute(this->m_hWnd,"open",

"mailto:nishinapp@yahoo.com","","", SW_SHOW );

Q: 如何用系统打印机打印文档?

ShellExecute(this->m_hWnd,"print",

"c:\\abc.txt","","", SW_HIDE);

Q: 如何用系统查找功能来查找指定文件?

ShellExecute(m_hWnd,"find","d:\\nish",

NULL,NULL,SW_SHOW);

Q: 如何启动一个程序,直到它运行结束?

SHELLEXECUTEINFO ShExecInfo = {0};

ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);

ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; ShExecInfo.hwnd = NULL;

ShExecInfo.lpVerb = NULL;

ShExecInfo.lpFile = "c:\\MyProgram.exe"; ShExecInfo.lpParameters = "";

ShExecInfo.lpDirectory = NULL;

ShExecInfo.nShow = SW_SHOW;

ShExecInfo.hInstApp = NULL;

ShellExecuteEx(&ShExecInfo);

WaitForSingleObject(ShExecInfo.hProcess,INFINITE); 或:

PROCESS_INFORMATION ProcessInfo;

STARTUPINFO StartupInfo; //This is an [in] parameter

ZeroMemory(&StartupInfo, sizeof(StartupInfo));

StartupInfo.cb = sizeof StartupInfo ; //Only compulsory field

上一页第4页

你可能喜欢

热门文档

相关文档

  • shell和ShellExecute的用法

    shell和ShellExecute的用法_IT/计算机_专业资料。把我自己总结的shell和ShellExecute的用法分享一下: shell 函数只可以执行.exe .com .bat 的可执行文件。 ...

  • ShellExecute使用方法

    ShellExecute使用方法_IT/计算机_专业资料。ShellExecute 使用方法 ShellExecute 能打开东西很多,打开外部程序、网页、文件夹、EMAIL、我的文档、我的电 脑、回收站...

  • ShellExecute函数用法

    2.函数原型: HINSTANCE ShellExecute(HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd); 3.参数说明: hwnd...

  • ShellExecute函数的用法

    ShellExecute 函数的用法 ShellExecute 的功能是运行一个外部程序(或者是打开一个已注册的 文件、打开一个目录、打印一个文件等等) ,并对外部程序有一定的控制。 ...

  • ShellExecute与ShellExecuteEx的用法 c++

    ShellExecute与ShellExecuteEx的用法 c++_IT/计算机_专业资料。介绍在C++里如何利用这两个函数在程序里轻松打开文件、文件夹、运行程序、打开网页等操作。这两个...

  • MFC ShellExecute用法

    MFC ShellExecute用法_IT/计算机_专业资料。介绍函数ShellExecute的用法MFC ShellExecute 用法概述 对指定的文件执行一个操作。常用来打开外部程序。 语法 HINSTANCE ...

  • API函数ShellExecute的使用

    API函数ShellExecute的使用_IT/计算机_专业资料。API函数应用说明... ShellExecute函数的用法 3页 免费 使用API函数-- 2页 免费 在VB中使用API...

  • ShellExecute

    ShellExecute_计算机软件及应用_IT/计算机_专业资料。delphi ShellExecute的应用Delphi ShellExecute 的用法 2011-04-12 13:54:19 分类: Delphi 标签: 字号...

  • ShellExecute

    delphi中ShellExecute使用... 2页 免费 ShellExecute函数的用法 3页 免费 shell和ShellExecute的用法... 2页 2财富值喜欢此文档的还喜欢 ShellExecute函数用法 ...

  • ShellExecute

    delphi中ShellExecute使... 2页 免费 ShellExecute函数的用法 3页 免费 MFC ShellExecute用法 4页 免费 ShellExecute 1页 免费 ShellExecute 3页 免费 Shell...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email