开发者

Open file with another application

Hy!

I want to open an .xml file from c++ with a specified application (knowing the path of the file and the path of the application). Same way as you would right-click the file and click "Open with..." and cho开发者_运维问答ose the application to start with.

Thanks in advance!


Usually applications allow command line arguments for file opening. For example, to open a file with notepad you can use command line :

notepad.exe a.txt

That's why you can use this feature with CreateProcess in Windows (which allows specifying arguments) or analogous function in other OS . HTH


how about simply:

system("application.exe file.xml");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜