📄 subject_41266.htm
字号:
<p>
序号:41266 发表者:hpj 发表日期:2003-05-25 20:27:17
<br>主题:请问mfc里怎么调用其它的exe
<br>内容:就是让程序运行中启动其它exe程序
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:TheCold 回复日期:2003-05-25 20:52:35
<br>内容:ShellExecute()<BR>CreateProcess()<BR>都行
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:黄豆豆 回复日期:2003-05-26 21:33:02
<br>内容:ShellExecute(<BR> HWND hwnd, <BR> LPCTSTR lpOperation,<BR> LPCTSTR lpFile, <BR> LPCTSTR lpParameters, <BR> LPCTSTR lpDirectory,<BR> INT nShowCmd<BR>);<BR>hwnd <BR><BR>Window handle to a parent window. This window receives any message boxes that an application produces. For example, an application may report an error by producing a message box. <BR><BR>lpOperation <BR><BR>Address of a null-terminated string that specifies the operation to perform. The following operation strings are valid: "open" The function opens the file specified by the lpFile parameter. The file can be an executable file or a document file. It can also be a folder. <BR>"print" The function prints the file specified by lpFile. The file should be a document file. If the file is an executable file, the function opens the file, as if "open" had been specified. <BR>"explore" The function explores the folder specified by lpFile. <BR><BR>This parameter can be NULL. In that case, the function opens the file specified by lpFile. <BR><BR>lpFile <BR><BR>Address of a null-terminated string that specifies the file to open or print or the folder to open or explore. The function can open an executable file or a document file. The function can print a document file. <BR><BR>lpParameters <BR><BR>If the lpFile parameter specifies an executable file, lpParameters is an address to a null-terminated string that specifies the parameters to be passed to the application. <BR>If lpFile specifies a document file, lpParameters should be NULL. <BR>lpDirectory <BR>Address of a null-terminated string that specifies the default directory. <BR><BR>nShowCmd <BR><BR>If lpFile specifies an executable file, nShowCmd specifies how the application is to be shown when it is opened. This parameter can be one of the following values: SW_HIDE Hides the window and activates another window. <BR>SW_MAXIMIZE Maximizes the specified window. <BR>SW_MINIMIZE Minimizes the specified window and activates the next top-level window in the z-order. <BR>SW_RESTORE Activates and displays the window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when restoring a minimized window. <BR>SW_SHOW Activates the window and displays it in its current size and position. <BR>SW_SHOWDEFAULT Sets the show state based on the SW_ flag specified in theSTARTUPINFO structure passed to theCreateProcess function by the program that started the application. An application should callShowWindow with this flag to set the initial show state of its main window. <BR>SW_SHOWMAXIMIZED Activates the window and displays it as a maximized window. <BR>SW_SHOWMINIMIZED Activates the window and displays it as a minimized window. <BR>SW_SHOWMINNOACTIVE Displays the window as a minimized window. The active window remains active. <BR>SW_SHOWNA Displays the window in its current state. The active window remains active. <BR>SW_SHOWNOACTIVATE Displays a window in its most recent size and position. The active window remains active. <BR>SW_SHOWNORMAL Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when displaying the window for the first time. <BR><BR>If lpFile specifies a document file, nShowCmd should be zero. <BR><BR>You can use this function to open or explore a shell folder. To open a folder, use either of the following calls: <BR><BR>ShellExecute(handle, NULL, path_to_folder, NULL, NULL, SW_SHOWNORMAL);<BR><BR> <BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -