Solved

Opening a File with Notepad from VC++

Posted on 2003-11-05
3
228 Views
Last Modified: 2013-11-20
Hi ,
I want to open a file in Notepad on a Event in VC++ .
At present i am using system() command to achive this.
But the command window is also being displayed with the
Notepad . I don't want the command window to be displayed
how do i achive this..
Regards
Dev
0
Comment
Question by:moonoo
  • 2
3 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 9691586
Hum, the easiest way (if it is a .txt file) would be to

ShellExecute ( NULL, "open", "myfile.txt", NULL, NULL, SW_SHOW);
0
 
LVL 86

Accepted Solution

by:
jkr earned 125 total points
ID: 9691597
BTW, if you want to enforce the usage of notepad if it is a file not registered with it,

ShellExecute ( NULL, "open", "notepad.exe", "myfile.sth", NULL, SW_SHOW);

would work also.

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
withoutTen challenge 14 88
firstChar challenge 13 86
wordappend challenge 8 86
how to split multiple lines delimiter : 8 55
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now