Gets the offset of the last backslash of a path. :omg: Enjoy!!
int PathLen( LPCWSTR sWholePath)
{
CString sTmp(sWholePath),sTmp2;
int iPos=sTmp.Find('\\'),iStart=iPos+1;
while(1)
{
sTmp2=sTmp.Mid(iStart);
iPos=sTmp2.Find('\\');
if(iPos >= 0)
iStart+=(iPos+1);
else
break;
};
return iStart;
};