Open a file in Notepad from VC++ Application

  • Thread starter Thread starter preetish
  • Start date Start date
P

preetish

Hi,

I am a total novice to VC++..I have a dialog based application
developed using MFC...my requirement is to open a file (with .dat or
..txt ext) invoking Notepad from my application. The user should be able
to pick the file from the list and then on hit of the Open button it
should open the file in notepad. I am not able to figure out how to
invoke notepad passing the filename from on my OPEN button click.
 
*Hi,

I am a total novice to VC++..I have a dialog based application
developed using MFC...my requirement is to open a file (with .dat or
...txt ext) invoking Notepad from my application. The user should b
able
to pick the file from the list and then on hit of the Open button it
should open the file in notepad. I am not able to figure out how to
invoke notepad passing the filename from on my OPEN button click. *

What About using CreateProcess or ShellExecute api

eg

Code
 
Back
Top