text string ID to numeric ID
-
I am receiving some configuration setting via a XML document. One of the entry is the caption of a column header. The caption is given using a string ID (IDS_COL1_CAPTION) when extracting this info from the XML document the resulting value is a string containing “IDS_COL1_CAPTION”. Is there a way to convert this text string ID into a numeric ID to be able to use the LoadString function of CString? Thank you
-
I am receiving some configuration setting via a XML document. One of the entry is the caption of a column header. The caption is given using a string ID (IDS_COL1_CAPTION) when extracting this info from the XML document the resulting value is a string containing “IDS_COL1_CAPTION”. Is there a way to convert this text string ID into a numeric ID to be able to use the LoadString function of CString? Thank you
nope. there's no automatic way to do it. you'll have to set up a mapping of strings to numerics. i would use a std::map. -c
Democracy is the worst form of government except all those other forms that have been tried from time to time. -- Winston Churchill
-
I am receiving some configuration setting via a XML document. One of the entry is the caption of a column header. The caption is given using a string ID (IDS_COL1_CAPTION) when extracting this info from the XML document the resulting value is a string containing “IDS_COL1_CAPTION”. Is there a way to convert this text string ID into a numeric ID to be able to use the LoadString function of CString? Thank you
I don't think so - if IDS_COL1_CAPTION is resource identifier. When you build exe/dll, the #defines are expanded to constant integers, there's no 'IDS_COL1_CAPTION' literal in executable. You'd have to provide your own mapping from strings to integers. Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
-
I don't think so - if IDS_COL1_CAPTION is resource identifier. When you build exe/dll, the #defines are expanded to constant integers, there's no 'IDS_COL1_CAPTION' literal in executable. You'd have to provide your own mapping from strings to integers. Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **