c++ - Opening a text in notepad in MFC -


just title stated. how open text in notepad in mfc?

i used cfiledialog open "save as" dialog box :

tchar szfilters[] =      _t ("text files (*.txt)¦*.txt¦all files (*.*)¦*.*¦¦");  cfiledialog dlg (false, _t ("txt"), _t ("*.txt"),     ofn_overwriteprompt, szfilters);  if (dlg.domodal () == idok)     m_strpathname = dlg.getpathname(); 

after have path name in m_strpathname, there anyway directly open txt file had been saved in notepad?

i have button onshowdata , code inside.

shellexecute(null, _t("open"), m_strpathname, null, null, sw_show);

is there other method this??

problem solved

the following api can used same

winexec("c:\myfolder", ...)


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -