Solved

Opening a File with Notepad from VC++

Posted on 2003-11-05
3
230 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Add content to output file 4 63
iSeries DB2 Query 2 95
method notes when mouse over in eclipse 5 86
wordappend challenge 8 172
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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 is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

813 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

13 Experts available now in Live!

Get 1:1 Help Now