0
Follow
0
View

MFC how to click the button in the menu bar to open the EXE file

dingxiang12a 注册会员
2023-01-26 00:05

Please accept:
ShellExecute(NULL, "open", "C:\Windows\System32\notepad.exe",NULL, NULL, SW_SHOWNORMAL);

Reference:

< a target = "_blank" > < span > http://blog.csdn.net/samdy1990/article/details/16919969 < / span > < / a >

cyf868610 注册会员
2023-01-26 00:05
< div class = "md_content_show e397 data - v - 3967" = "" >

this article can solve your problem.

heping8815 注册会员
2023-01-26 00:05
  1. Adds a menu item to the menu bar of the MFC application and adds a response function to it, such as OnOpenEXE;

  2. Add the following code to the OnOpenEXE function:

CString strPath;
strPath.Format(_T("C:\Program Files\MyApp\MyApp.exe"));

// Start MyApp.exe
ShellExecute(NULL, _T("open"), strPath, NULL, NULL, SW_SHOW);

About the Author

Question Info

Publish Time
2023-01-26 00:05
Update Time
2023-01-26 00:05

Related Question

Eclipse加Tomcat 导入的html加载不了css

是谁?拼写检查真的很伤脑筋.Loesn5t auto fcorrupt fivd abd fix error gud with?

Storing multiple arrays in a np.zeros or np.ones

安装pytorch成功后,import torch报错怎么解决!

Golang Gorm Automigrate不创建字段类型“time”

idea运行tomcat时为什么调试模式用不了

在Cytoscape JS中添加背景图像到边缘

是否可以删除call to call?

MTProto中的模拟搜索chatsnearby方法

Kubernetes NFS Storage的正确的/etc/exports设置是什么?