Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Checking if a file exists Pin
David Crow23-Oct-06 9:56
David Crow23-Oct-06 9:56 
AnswerRe: Checking if a file exists Pin
Sceptic Mole23-Oct-06 11:23
Sceptic Mole23-Oct-06 11:23 
QuestionRe: Checking if a file exists Pin
David Crow24-Oct-06 3:28
David Crow24-Oct-06 3:28 
AnswerRe: Checking if a file exists Pin
Mila02523-Oct-06 10:31
Mila02523-Oct-06 10:31 
AnswerRe: Checking if a file exists Pin
Jörgen Sigvardsson23-Oct-06 11:21
Jörgen Sigvardsson23-Oct-06 11:21 
AnswerRe: Checking if a file exists Pin
Hamid_RT23-Oct-06 22:15
Hamid_RT23-Oct-06 22:15 
AnswerRe: Checking if a file exists Pin
fat_boy23-Oct-06 23:43
fat_boy23-Oct-06 23:43 
AnswerRe: Checking if a file exists Pin
Giulio200024-Oct-06 0:44
Giulio200024-Oct-06 0:44 
Thanks to you all.
Smile | :)

In the end I will the easiest. I will try to open it to read and then check if it is open:

ifstream InSettingsFile(pDoc->ExecutablePath + "Settings.cfg",ios::nocreate);
if (!InSettingsFile.is_open())
{
AfxMessageBox("File does not exists");
}

The PathFileExists function looked promising but then you need some include which I don't seem to have or something. You know, I am beginner with this stuff and don't really have the time to look for "optimal" solutions.

Ciao


Giulio
GeneralRe: Checking if a file exists Pin
Blake Miller25-Oct-06 7:18
Blake Miller25-Oct-06 7:18 
Questionkey F1 and a button on property sheet Pin
includeh1023-Oct-06 8:32
includeh1023-Oct-06 8:32 
AnswerRe: key F1 and a button on property sheet Pin
tanvon malik23-Oct-06 19:56
tanvon malik23-Oct-06 19:56 
Questionfocus for a new child window Pin
prithaa23-Oct-06 8:27
prithaa23-Oct-06 8:27 
QuestionWanr to read excel files Pin
prithaa23-Oct-06 8:19
prithaa23-Oct-06 8:19 
QuestionRe: Wanr to read excel files Pin
David Crow23-Oct-06 9:58
David Crow23-Oct-06 9:58 
AnswerRe: Wanr to read excel files Pin
prithaa23-Oct-06 17:24
prithaa23-Oct-06 17:24 
GeneralRe: Wanr to read excel files Pin
David Crow24-Oct-06 3:02
David Crow24-Oct-06 3:02 
Questioninitializing static const members using functions Pin
rockychaudhary23-Oct-06 8:00
rockychaudhary23-Oct-06 8:00 
AnswerRe: initializing static const members using functions Pin
Cedric Moonen23-Oct-06 8:19
Cedric Moonen23-Oct-06 8:19 
GeneralRe: initializing static const members using functions Pin
Zac Howland23-Oct-06 8:27
Zac Howland23-Oct-06 8:27 
AnswerRe: initializing static const members using functions Pin
Zac Howland23-Oct-06 8:21
Zac Howland23-Oct-06 8:21 
GeneralRe: initializing static const members using functions Pin
rockychaudhary23-Oct-06 8:57
rockychaudhary23-Oct-06 8:57 
GeneralRe: initializing static const members using functions Pin
Zac Howland23-Oct-06 9:39
Zac Howland23-Oct-06 9:39 
AnswerRe: initializing static const members using functions Pin
includeh1023-Oct-06 8:23
includeh1023-Oct-06 8:23 
GeneralRe: initializing static const members using functions Pin
rockychaudhary23-Oct-06 8:54
rockychaudhary23-Oct-06 8:54 
Questionsize of a new window Pin
prithaa23-Oct-06 7:53
prithaa23-Oct-06 7:53 

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.