Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Survey of Technique Questions..

Survey of Technique Questions..

Scheduled Pinned Locked Moved C / C++ / MFC
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brian R
    wrote on last edited by
    #1

    Almost every program I have worked on uses some technqiue to convert enumberated values to strings (and vice-versa). I suspect I have seen a dozen or more different techniques when multi-language translation is factored in. I am curious to what preferences other developers have and any pros/cons they see with those techniques.

    T T 2 Replies Last reply
    0
    • B Brian R

      Almost every program I have worked on uses some technqiue to convert enumberated values to strings (and vice-versa). I suspect I have seen a dozen or more different techniques when multi-language translation is factored in. I am curious to what preferences other developers have and any pros/cons they see with those techniques.

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      so, what is the "survey" about ?


      TOXCCT >>> GEII power
      [toxcct][VisualCalc]

      B 1 Reply Last reply
      0
      • T toxcct

        so, what is the "survey" about ?


        TOXCCT >>> GEII power
        [toxcct][VisualCalc]

        B Offline
        B Offline
        Brian R
        wrote on last edited by
        #3

        Sorry to be vague. Was wondering what generic techniques you use/recommend for implementing conversions between enumberated type values and string representations. Also curious how (of if) you would use a different technique for multi-language support/translation.

        R 1 Reply Last reply
        0
        • B Brian R

          Sorry to be vague. Was wondering what generic techniques you use/recommend for implementing conversions between enumberated type values and string representations. Also curious how (of if) you would use a different technique for multi-language support/translation.

          R Offline
          R Offline
          Ravi Bhavnani
          wrote on last edited by
          #4

          I created a class called EnumStringMap which maps enums to CStrings and/or resource ids. The includes some handy-dandy helper methods that allow it to be used with a CComboBox. Unfortunately I can't post it because it's code written for work. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

          1 Reply Last reply
          0
          • B Brian R

            Almost every program I have worked on uses some technqiue to convert enumberated values to strings (and vice-versa). I suspect I have seen a dozen or more different techniques when multi-language translation is factored in. I am curious to what preferences other developers have and any pros/cons they see with those techniques.

            T Offline
            T Offline
            ThatsAlok
            wrote on last edited by
            #5

            TRY CMap with integer as a KEY!

            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

            cheers, Alok Gupta

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups