[in] String name of an enum value.
EnumFromName
Converts the string name of an enum value to its numeric value.
Syntax
Section titled “Syntax”template <typename T>bool EnumFromName(const CString& strName, T& enumVal) const;Parameters
Section titled “Parameters”strName
enumVal
[out] Enum value associated with the specified name.
Return value
Section titled “Return value”Returns true if the conversion was successful, otherwise false.
Example
Section titled “Example”The following example demonstrates use of the EnumFromName function.
HRESULT Acme4321::ConfigureTrigger(){ HRESULT hr = S_OK;
IviFgenTriggerSource eSource; EnumFromString(_T("IviFgenTriggerSourceInternal"), eSource);
ATLASSERT(eSource == IviFgenTriggerSourceInternal);
return hr;}