Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WinExec

Status
Not open for further replies.

shetlandbob

Programmer
Mar 9, 2004
528
GB

I have the following command:

Code:
  WinExec ( "notePad.exe", SW_SHOW );

Which will launch notepad as expected, can I get it to launch notepad with a file already loaded into notepad? (Note this will be "data.dat", where dat files are not necessarily loaded automatically with Notepad?

Thanks
 
Try:
Code:
WinExec ( "file.txt", SW_SHOW );

[olympics][americanflag]U.S.A. U.S.A. U.S.A.[americanflag][olympics]
 
that wont work as it simply tries to execute the test file. It does not know that you want to open that file with Notepad.

Cheers anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top