Comment faire pour convertir CString en type Enum dans MFC (VC++)?Convertir CString en type Enum dans MFC (VC++)?
J'ai une méthode qui prend le paramètre d'entrée comme Enum mais je lui passe la valeur Cstring comment je peux le convertir en enum.
CString strFolderType = strFolderType.Right(strFolderType.GetLength()-(fPos+1));
m_strFolderType = strFolderType ;
J'ai une méthode comme
ProtocolIdentifier(eFolderType iFolderType)
where enum eFolderType
{
eFTP = 1,
eCIFS,
eBOTH
};
now when i am calling like this :
ProtocolIdentifier(m_strFolderType);
It says cannot convert CString to eFolderType ...
How to resolve this ?