Click here to Skip to main content
15,902,777 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to make MSDN-like help file? Pin
Jim Crafton18-Oct-04 9:26
Jim Crafton18-Oct-04 9:26 
GeneralRe: how to make MSDN-like help file? Pin
Vikram Kashyap19-Oct-04 2:59
Vikram Kashyap19-Oct-04 2:59 
GeneralRe: how to make MSDN-like help file? Pin
Jim Crafton20-Oct-04 14:54
Jim Crafton20-Oct-04 14:54 
Questionhow to make profile in dll Pin
Member 60171517-Oct-04 23:33
Member 60171517-Oct-04 23:33 
GeneralCreating a new window Pin
FrankMichael17-Oct-04 22:06
FrankMichael17-Oct-04 22:06 
GeneralRe: Creating a new window Pin
Mad__18-Oct-04 0:26
Mad__18-Oct-04 0:26 
GeneralGDI+ metafile problem Pin
P e t e r17-Oct-04 21:19
P e t e r17-Oct-04 21:19 
QuestionHow to open a txt file in a notepad using CFileDialog. Pin
PrashantJ17-Oct-04 21:11
PrashantJ17-Oct-04 21:11 
I have my code to open the file-dialog box. With this I am able to select the file, but I want to open the file in an notepad. Can anybody help me for this?
Here goes my code. Thanks in advance

try
{
CWaitCursor wait;
CString filename = _T("");

CFileDialog dlg(true, "txt", "*.*", 0, _T("Log Files (*.txt)||"));

CString logs_path = getenv(_T("ENV_VARIABLE"));
logs_path += _T("\\Logs");
dlg.m_ofn.lpstrInitialDir = logs_path.GetBuffer(logs_path.GetLength());

// now let the user select
int result = 0;

result = dlg.DoModal();
if (result == IDOK)
{
// get the new file name
filename = dlg.GetPathName();

// does the file exist??
CFileStatus status;
if (!CFile::GetStatus (filename, status))
{
// do nothing
}
}
else
return;
}
catch (...)
{
//...
}

- Prashant
AnswerRe: How to open a txt file in a notepad using CFileDialog. Pin
Ted Ferenc17-Oct-04 21:34
Ted Ferenc17-Oct-04 21:34 
AnswerRe: How to open a txt file in a notepad using CFileDialog. Pin
22491717-Oct-04 23:01
22491717-Oct-04 23:01 
GeneralAbsolute Newbie question Pin
Gavin Jeffrey17-Oct-04 21:06
Gavin Jeffrey17-Oct-04 21:06 
GeneralRe: Absolute Newbie question Pin
Aamir Butt17-Oct-04 21:18
Aamir Butt17-Oct-04 21:18 
QuestionDirectshow - load movie always increase memory usage? Pin
Indrawati17-Oct-04 20:39
Indrawati17-Oct-04 20:39 
GeneralFind the errors! Pin
Guoguor17-Oct-04 20:37
Guoguor17-Oct-04 20:37 
GeneralRe: Find the errors! Pin
Guoguor17-Oct-04 20:44
Guoguor17-Oct-04 20:44 
GeneralDirectShow - Capturin video to an avi file Pin
defused17-Oct-04 19:40
defused17-Oct-04 19:40 
GeneralA prolem with Static text ! Pin
King of Merit17-Oct-04 17:59
King of Merit17-Oct-04 17:59 
GeneralRe: A prolem with Static text ! Pin
Ryan Binns17-Oct-04 18:17
Ryan Binns17-Oct-04 18:17 
GeneralRe: A prolem with Static text ! Pin
Sujan Christo17-Oct-04 18:21
Sujan Christo17-Oct-04 18:21 
GeneralManaging Header-Files Pin
Anonymous17-Oct-04 14:21
Anonymous17-Oct-04 14:21 
GeneralRe: Managing Header-Files Pin
toxcct17-Oct-04 21:14
toxcct17-Oct-04 21:14 
QuestionWhat is wrong with my code!! trying to call from one form to the other and back Pin
V5Dave17-Oct-04 11:54
V5Dave17-Oct-04 11:54 
QuestionDestructor not getting rid of the instance? Pin
Kieroshark17-Oct-04 10:03
Kieroshark17-Oct-04 10:03 
AnswerRe: Destructor not getting rid of the instance? Pin
Michael Dunn17-Oct-04 10:28
sitebuilderMichael Dunn17-Oct-04 10:28 
AnswerRe: Destructor not getting rid of the instance? Pin
Mike Dimmick17-Oct-04 12:22
Mike Dimmick17-Oct-04 12:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.