|
-
April 27th, 2003, 09:22 PM
#1
How can i open a file in notepad from MFC dialog based application
How can i open a file in notepad from MFC dialog based application
-
April 27th, 2003, 09:54 PM
#2
Hi Sir,
Try the following code:
CString strFile;
strFile = "c:\\temp\\readme.txt";
ShellExecute(NULL,
"open",
strFile,
NULL,NULL,
SW_SHOW);
Andy
--------------------------------------------------------
http://www.********.net
XD++ MFC Library provides Microsoft Foundation Class (MFC)/Visual C++ developers with a complete library of MFC extension classes which implement a drag and drop (e.g. VC,VB Form Editor) graphical interface.
-
April 27th, 2003, 09:57 PM
#3
Code:
ShellExecute(NULL, "open", "NOTEPAD MYTEXT.TXT", NULL, NULL, SW_SHOW);
Hope this will help you.
-
April 28th, 2003, 01:09 AM
#4
it doesnt display the notepad with file
thanks for the reply but
it doesnt display the notepad with file
-
April 28th, 2003, 01:28 AM
#5
Take a look at this FAQ...
-
April 28th, 2003, 01:29 AM
#6
Try using:
Code:
ShellExecute(NULL, "open", "NOTEPAD","MYTEXT.TXT", NULL, SW_SHOW);
Where 'MYTEXT.TXT" is agument to notepad. You may need to pass full path of the file.
-
April 28th, 2003, 01:30 AM
#7
thanx it worked
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|