OMG why in the world are you doing that just to extract the name part of the string! If the CString already contains the full path + filename just use its Find() method to locate the last '\' and you have the name starting with the next character.
>>That mean I have to cast CString to a char buffer, is that right? Is it possible?
Depends -- is your program compiled for UNICODE or not. If it is, then CString can not be simply typecase, it must be converted from wchar_t* to char* with one of the conversion functions.
Last edited by Ancient Dragon; Nov 8th, 2007 at 8:38 am.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,950 posts
since Aug 2005