Click here to Skip to main content
15,907,396 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CFile::GetFileTitle() broken. Pin
Jon Hulatt29-Jan-02 6:45
Jon Hulatt29-Jan-02 6:45 
GeneralRe: CFile::GetFileTitle() broken. Pin
Ravi Bhavnani29-Jan-02 6:57
professionalRavi Bhavnani29-Jan-02 6:57 
GeneralRe: CFile::GetFileTitle() broken. Pin
Jamie Hale29-Jan-02 7:30
Jamie Hale29-Jan-02 7:30 
GeneralRe: CFile::GetFileTitle() broken. Pin
Michael Dunn29-Jan-02 13:45
sitebuilderMichael Dunn29-Jan-02 13:45 
GeneralRe: CFile::GetFileTitle() broken. Pin
Michael Dunn29-Jan-02 8:40
sitebuilderMichael Dunn29-Jan-02 8:40 
GeneralRe: CFile::GetFileTitle() broken. Pin
Jamie Hale29-Jan-02 10:00
Jamie Hale29-Jan-02 10:00 
GeneralRe: CFile::GetFileTitle() broken. Pin
Michael Dunn29-Jan-02 10:16
sitebuilderMichael Dunn29-Jan-02 10:16 
GeneralRe: CFile::GetFileTitle() broken. Pin
Jamie Hale29-Jan-02 11:09
Jamie Hale29-Jan-02 11:09 
Wowsers... didn't read the spec completely. What the hell type of function modifies a string buffer in place?

I suppose the GetBuffer() would be safe since PathRemoveExtension() shouldn't try to expand the string at all.

CFile f("c:\program files\microsnot\wankitywank.txt", CFile::modeRead);
CString strTitle = f.GetFileTitle();
PathRemoveExtension(strTitle.GetBuffer(0));
strTitle.ReleaseBuffer();


Except, now I need to link in shlwapi.lib... I'm going back to my ReverseFind('.')...

Thanks though.

J
GeneralRe: CFile::GetFileTitle() broken. Pin
Michael Dunn29-Jan-02 13:47
sitebuilderMichael Dunn29-Jan-02 13:47 
QuestionAutoupdate? Pin
AAntix29-Jan-02 5:10
AAntix29-Jan-02 5:10 
GeneralAnimated GIF's Pin
Adrian Metcalfe29-Jan-02 5:02
Adrian Metcalfe29-Jan-02 5:02 
GeneralRe: Animated GIF's Pin
Joaquín M López Muñoz29-Jan-02 5:11
Joaquín M López Muñoz29-Jan-02 5:11 
GeneralOnCancel Pin
ClayMoney29-Jan-02 3:33
ClayMoney29-Jan-02 3:33 
GeneralRe: OnCancel Pin
567890123429-Jan-02 4:02
567890123429-Jan-02 4:02 
GeneralCustom window like sonork messenger Pin
29-Jan-02 3:17
suss29-Jan-02 3:17 
GeneralRe: Custom window like sonork messenger Pin
Jamie Hale29-Jan-02 5:33
Jamie Hale29-Jan-02 5:33 
GeneralMonitor serial port activity Pin
Mehdi Mousavi29-Jan-02 1:41
Mehdi Mousavi29-Jan-02 1:41 
GeneralRe: Monitor serial port activity Pin
.::RockNix::.29-Jan-02 2:34
.::RockNix::.29-Jan-02 2:34 
GeneralRe: Monitor serial port activity Pin
Fredrik Skog29-Jan-02 3:17
Fredrik Skog29-Jan-02 3:17 
GeneralWord Automation: wdWindowStateNormal PROBLEM Pin
Braulio Dez29-Jan-02 0:21
Braulio Dez29-Jan-02 0:21 
GeneralRe: Word Automation: wdWindowStateNormal PROBLEM Pin
Joaquín M López Muñoz29-Jan-02 1:06
Joaquín M López Muñoz29-Jan-02 1:06 
GeneralRe: Word Automation: wdWindowStateNormal PROBLEM Pin
Braulio Dez29-Jan-02 1:21
Braulio Dez29-Jan-02 1:21 
Generaldebugging service Pin
.::RockNix::.29-Jan-02 0:02
.::RockNix::.29-Jan-02 0:02 
GeneralRe: debugging service Pin
Bill Wilson29-Jan-02 10:45
Bill Wilson29-Jan-02 10:45 
GeneralHeapReAlloc v.s realloc Pin
alex.barylski28-Jan-02 22:07
alex.barylski28-Jan-02 22:07 

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.