Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to add a Help button to a CFileDialog Pin
Masaaki Onishi10-May-01 13:52
Masaaki Onishi10-May-01 13:52 
Generalopen, save *.bmp (HELP ME) Pin
mr200310-May-01 4:00
mr200310-May-01 4:00 
GeneralRe: open, save *.bmp (HELP ME) Pin
Tomasz Sowinski10-May-01 7:43
Tomasz Sowinski10-May-01 7:43 
GeneralRe: open, save *.bmp (HELP ME) Pin
Christian Graus10-May-01 14:13
protectorChristian Graus10-May-01 14:13 
QuestionHow to identify a non Text file Pin
Shrini10-May-01 3:57
Shrini10-May-01 3:57 
AnswerRe: How to identify a non Text file Pin
l a u r e n10-May-01 6:41
l a u r e n10-May-01 6:41 
GeneralRe: How to identify a non Text file Pin
Shrini10-May-01 9:05
Shrini10-May-01 9:05 
AnswerRe: How to identify a non Text file Pin
David Fleming10-May-01 7:10
David Fleming10-May-01 7:10 
I have never done this, so I can't guarantee it will work, but....

You can use the CStdioFile class to open the file (it will open it whether it is a text file or not). Then
perform CStdioFile::ReadString on the file. According to the documentation it reads only text from the file.
If the function throws an error, you don't have text to read. It won't throw an error if it simply encounters
the end of the file or a carriage return. If, however, it returns a string, then you know you have a
text file.

I hope that helps.

David.
AnswerRe: How to identify a non Text file Pin
Tomasz Sowinski10-May-01 8:04
Tomasz Sowinski10-May-01 8:04 
Questionsee any problem with this? Pin
10-May-01 3:19
suss10-May-01 3:19 
AnswerRe: see any problem with this? Pin
Christian Graus10-May-01 14:15
protectorChristian Graus10-May-01 14:15 
GeneralRe: see any problem with this? Pin
10-May-01 22:11
suss10-May-01 22:11 
GeneralUnused code Pin
Mike Eriksson10-May-01 1:03
Mike Eriksson10-May-01 1:03 
GeneralRe: Unused code Pin
10-May-01 2:36
suss10-May-01 2:36 
GeneralRe: Unused code Pin
#realJSOP10-May-01 5:30
professional#realJSOP10-May-01 5:30 
GeneralRe: Unused code Pin
Christian Graus10-May-01 14:16
protectorChristian Graus10-May-01 14:16 
GeneralRe: Unused code Pin
Maxime Labelle10-May-01 6:46
Maxime Labelle10-May-01 6:46 
GeneralRe: Unused code Pin
Tomasz Sowinski10-May-01 8:11
Tomasz Sowinski10-May-01 8:11 
GeneralArray containing different data type Pin
9-May-01 23:20
suss9-May-01 23:20 
GeneralRe: Array containing different data type Pin
Danoo9-May-01 23:38
Danoo9-May-01 23:38 
GeneralRe: Array containing different data type Pin
#realJSOP10-May-01 1:07
professional#realJSOP10-May-01 1:07 
GeneralURGENT: Mouse hook problem, help me Pin
Do Quyet Tien9-May-01 22:20
Do Quyet Tien9-May-01 22:20 
GeneralRe: URGENT: Mouse hook problem, help me Pin
AlexEg10-May-01 0:25
AlexEg10-May-01 0:25 
GeneralThanhx for all your helping, but it didn't work Pin
Do Quyet Tien11-May-01 19:39
Do Quyet Tien11-May-01 19:39 
GeneralMFC tutorial on the web Pin
imran9-May-01 22:19
imran9-May-01 22:19 

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.