Click here to Skip to main content
15,900,456 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Get File Extension Pin
Randor 26-Apr-12 0:57
professional Randor 26-Apr-12 0:57 
GeneralRe: Get File Extension Pin
jkirkerx26-Apr-12 7:10
professionaljkirkerx26-Apr-12 7:10 
GeneralRe: Get File Extension Pin
«_Superman_»26-Apr-12 19:49
professional«_Superman_»26-Apr-12 19:49 
GeneralRe: Get File Extension Pin
jkirkerx26-Apr-12 10:08
professionaljkirkerx26-Apr-12 10:08 
GeneralRe: Get File Extension Pin
Randor 26-Apr-12 18:23
professional Randor 26-Apr-12 18:23 
GeneralRe: Get File Extension Pin
Le Quang Long27-Apr-12 15:10
Le Quang Long27-Apr-12 15:10 
GeneralRe: Get File Extension Pin
Randor 28-Apr-12 0:14
professional Randor 28-Apr-12 0:14 
AnswerRe: Get File Extension Pin
JohnCz29-Apr-12 4:28
JohnCz29-Apr-12 4:28 
THe code snippet assumes UNICODE is being used.
I would suggest to use generic mapping that will work for both: ANSII and UNICODE:
As for retrieving parts of the path why not to let CRT do it for you using generic (_tsplitpath_s)?
For example:

C++
LPTSTR lpszPath = _T("project.config.user");
TCHAR szFilename[MAX_PATH] = {0};
TCHAR szExt[MAX_PATH] = {0};

_tsplitpath_s(lpszPath, NULL, NULL, NULL, NULL, szFilename, _MAX_FNAME, szExt, _MAX_EXT);

JohnCz

GeneralRe: Get File Extension Pin
jkirkerx29-Apr-12 9:27
professionaljkirkerx29-Apr-12 9:27 
GeneralCALLING A NEW DIALOG Pin
Le Quang Long25-Apr-12 4:01
Le Quang Long25-Apr-12 4:01 
AnswerRe: CALLING A NEW DIALOG Pin
Albert Holguin25-Apr-12 4:15
professionalAlbert Holguin25-Apr-12 4:15 
GeneralRe: CALLING A NEW DIALOG Pin
JohnCz29-Apr-12 4:54
JohnCz29-Apr-12 4:54 
GeneralRe: CALLING A NEW DIALOG Pin
Maximilien25-Apr-12 5:28
Maximilien25-Apr-12 5:28 
GeneralRe: CALLING A NEW DIALOG Pin
Chris Meech25-Apr-12 7:30
Chris Meech25-Apr-12 7:30 
GeneralRe: CALLING A NEW DIALOG Pin
Le Quang Long27-Apr-12 15:17
Le Quang Long27-Apr-12 15:17 
GeneralRe: CALLING A NEW DIALOG Pin
Le Quang Long28-Apr-12 18:10
Le Quang Long28-Apr-12 18:10 
GeneralRe: CALLING A NEW DIALOG Pin
David Crow25-Apr-12 5:40
David Crow25-Apr-12 5:40 
GeneralRe: CALLING A NEW DIALOG Pin
Le Quang Long25-Apr-12 14:29
Le Quang Long25-Apr-12 14:29 
GeneralRe: CALLING A NEW DIALOG Pin
Le Quang Long25-Apr-12 14:30
Le Quang Long25-Apr-12 14:30 
GeneralRe: CALLING A NEW DIALOG Pin
Le Quang Long25-Apr-12 14:32
Le Quang Long25-Apr-12 14:32 
GeneralRe: CALLING A NEW DIALOG Pin
Richard MacCutchan25-Apr-12 21:16
mveRichard MacCutchan25-Apr-12 21:16 
Questionwhy need write itself hashtable? Pin
yu-jian24-Apr-12 20:27
yu-jian24-Apr-12 20:27 
AnswerRe: why need write itself hashtable? Pin
Richard MacCutchan24-Apr-12 22:34
mveRichard MacCutchan24-Apr-12 22:34 
QuestionSelecting median Pin
a1_shay24-Apr-12 3:12
a1_shay24-Apr-12 3:12 
GeneralRe: Selecting median Pin
Aescleal24-Apr-12 4:10
Aescleal24-Apr-12 4:10 

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.