Click here to Skip to main content
15,917,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Use Windows command bar icon (FaceID) on dialog? Pin
J.B.3-Jul-08 17:57
J.B.3-Jul-08 17:57 
QuestionRe: Use Windows command bar icon (FaceID) on dialog? Pin
David Crow4-Jul-08 5:32
David Crow4-Jul-08 5:32 
GeneralRe: Use Windows command bar icon (FaceID) on dialog? Pin
J.B.4-Jul-08 17:53
J.B.4-Jul-08 17:53 
QuestionDefault Contextmenu in my Application Pin
john56321-Jul-08 22:26
john56321-Jul-08 22:26 
AnswerRe: Default Contextmenu in my Application Pin
ThatsAlok1-Jul-08 22:40
ThatsAlok1-Jul-08 22:40 
GeneralRe: Default Contextmenu in my Application Pin
john56322-Jul-08 0:33
john56322-Jul-08 0:33 
QuestionGetting file extension from path Pin
__DanC__1-Jul-08 22:14
__DanC__1-Jul-08 22:14 
AnswerRe: Getting file extension from path [modified] Pin
Nibu babu thomas1-Jul-08 22:38
Nibu babu thomas1-Jul-08 22:38 
__DanC__ wrote:
I need to know if pwszPath ends with MY_EXT but I can't think how to do it..


Use PathFindExtension.

Matching extension will somewhat look like this...

// Assumption: there is no '.' in extension
bool MatchExtension( LPCTSTR lpctszMyPath, LPCTSTR lpctszChkExt )
{
 ASSERT( lpctszMyPath && lpctszChkExt );
 LPCTSTR lpctszExt = PathFindExtension( lpctszMyPath );
 // Or if you don't wish to link to shlwapi for this one function use
 // LPCTSTR lpctszExt = _tcsrchr( lpctszMyPath, _T( '.' ));
 return ( lpctszExt && _tcscmpi( lpctszExt + 1, lpctszChkExt ) == 0 );
}



Nibu babu thomas
Microsoft MVP for VC++


Code must be written to be read, not by the compiler, but by another human being.

Programming Blog: http://nibuthomas.wordpress.com

modified on Wednesday, July 2, 2008 5:06 AM

GeneralRe: Getting file extension from path Pin
__DanC__1-Jul-08 23:11
__DanC__1-Jul-08 23:11 
GeneralRe: Getting file extension from path Pin
Nibu babu thomas1-Jul-08 23:12
Nibu babu thomas1-Jul-08 23:12 
QuestionRe: Getting file extension from path Pin
CPallini1-Jul-08 22:55
mveCPallini1-Jul-08 22:55 
AnswerRe: Getting file extension from path Pin
Naveen1-Jul-08 23:46
Naveen1-Jul-08 23:46 
GeneralRe: Getting file extension from path Pin
CPallini1-Jul-08 23:58
mveCPallini1-Jul-08 23:58 
GeneralRe: Getting file extension from path Pin
Naveen2-Jul-08 0:01
Naveen2-Jul-08 0:01 
JokeRe: Getting file extension from path Pin
Nelek3-Jul-08 22:00
protectorNelek3-Jul-08 22:00 
GeneralRe: Getting file extension from path Pin
CPallini3-Jul-08 22:13
mveCPallini3-Jul-08 22:13 
GeneralRe: Getting file extension from path Pin
Nelek6-Jul-08 2:43
protectorNelek6-Jul-08 2:43 
QuestionPlay AVI on Status bar Pin
ptr_Electron1-Jul-08 21:12
ptr_Electron1-Jul-08 21:12 
AnswerRe: Play AVI on Status bar [modified] Pin
Nibu babu thomas1-Jul-08 22:33
Nibu babu thomas1-Jul-08 22:33 
GeneralRe: Play AVI on Status bar Pin
ptr_Electron1-Jul-08 23:12
ptr_Electron1-Jul-08 23:12 
QuestionHow to release a Visual C++ Express Project? [modified] Pin
BrockCooper11-Jul-08 21:02
BrockCooper11-Jul-08 21:02 
AnswerRe: How to release a Visual C++ Express Project? Pin
Saurabh.Garg1-Jul-08 21:10
Saurabh.Garg1-Jul-08 21:10 
AnswerRe: How to release a Visual C++ Express Project? Pin
Saurabh.Garg1-Jul-08 21:13
Saurabh.Garg1-Jul-08 21:13 
QuestionOpen a Url the user has entered form a text box Pin
BrockCooper11-Jul-08 20:58
BrockCooper11-Jul-08 20:58 
AnswerRe: Open a Url the user has entered form a text box Pin
Hamid_RT1-Jul-08 21:01
Hamid_RT1-Jul-08 21:01 

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.