| 201 | |
| 202 | #ifdef __AFX_H__ |
| 203 | CString GetDirectory(const CString& strPath) |
| 204 | { |
| 205 | int nIndex = strPath.ReverseFind('\\'); |
| 206 | |
| 207 | if (nIndex <= 0) // No extension |
| 208 | return CString(_T("")); |
| 209 | else |
| 210 | { |
| 211 | CString strDirectory(strPath.Left(nIndex + 1)); |
| 212 | return strDirectory; |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | CString GetFilename(const CString& strPath) |
| 217 | { |