[英]get default Windows text editor .exe path using c++
Just wanted to know how to get default Windows text editor .exe path c++. 只想知道如何获取默认的Windows文本编辑器.exe路径c ++。 I badly need this to improve one of my c++ assignment.
我非常需要这样做来改善我的C ++作业之一。 I've no idea how to do it.
我不知道该怎么做。
If you require it to open files, then you can use ShellExecute
with the edit
(or open
) verb to get everything done all-in-one, else you can use SHAssocEnumHandlers
to get the handlers for the text based files you are interested in. 如果您需要它来打开文件,则可以将
ShellExecute
与edit
(或open
)动词一起使用,以使所有操作全部完成,否则,您可以使用SHAssocEnumHandlers
来获取您感兴趣的基于文本的文件的处理程序。
In the most simple case, you can also use %windir%\\\\notepad.exe
which will link to notepad on any desktop version of windows. 在最简单的情况下,您还可以使用
%windir%\\\\notepad.exe
,它将链接到Windows的任何桌面版本上的记事本。
通常的方法是使用FindExecutable
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.