get default Windows text editor .exe path using c++
-
24-06-2021 - |
سؤال
Just wanted to know how to get default Windows text editor .exe path c++. I badly need this to improve one of my c++ assignment. I've no idea how to do it.
المحلول
The usual way would be with FindExecutable
.
نصائح أخرى
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.
In the most simple case, you can also use %windir%\\notepad.exe
which will link to notepad on any desktop version of windows.
لا تنتمي إلى StackOverflow