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. How do you modify a string from a string table and/or how you use it ?

How do you modify a string from a string table and/or how you use it ?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialc++helpquestionlearning
5 Posts 3 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.
  • A Offline
    A Offline
    andreir23
    wrote on last edited by
    #1

    Please don't flame me (too much)... I am still a beginner. I have a dialog type MFC app with 1 string table. I added there strings for all controls and visual messages to the user. All these in order to make my app multi-language prepared. I thought this way: "I have default strings for everything. Then I try to load a language.ini file and overwrite every string in the string table with the ones that I read from the ini file. This way if the ini file is incomplete, I won't have textless controls or messages" My problem is that I don't know how to : a) Modify (IF POSSIBLE?) a string stored in a string table b) Use a string from the string table as a parameter to a function that requires one. For example for MessageBox. Thank you. PS: One way to do b) that I found is: CString test; test.LoadString(IDS_STOP); MessageBox(test,"abc",MB_OK); Only I fear that there is a simpler way.

    B J 2 Replies Last reply
    0
    • A andreir23

      Please don't flame me (too much)... I am still a beginner. I have a dialog type MFC app with 1 string table. I added there strings for all controls and visual messages to the user. All these in order to make my app multi-language prepared. I thought this way: "I have default strings for everything. Then I try to load a language.ini file and overwrite every string in the string table with the ones that I read from the ini file. This way if the ini file is incomplete, I won't have textless controls or messages" My problem is that I don't know how to : a) Modify (IF POSSIBLE?) a string stored in a string table b) Use a string from the string table as a parameter to a function that requires one. For example for MessageBox. Thank you. PS: One way to do b) that I found is: CString test; test.LoadString(IDS_STOP); MessageBox(test,"abc",MB_OK); Only I fear that there is a simpler way.

      B Offline
      B Offline
      BaldwinMartin
      wrote on last edited by
      #2

      Paul DiLascia wrote such an article 8 or 10 years ago. I think it was called multi-lingual applications for MFC it was when VC5 first came out. Sorry I am no more help than this but I am sure he did such an article. Try his home page or microturd soft. http://www.dilascia.com/ cppqa@microsoft.com Best Wishes, ez_way

      1 Reply Last reply
      0
      • A andreir23

        Please don't flame me (too much)... I am still a beginner. I have a dialog type MFC app with 1 string table. I added there strings for all controls and visual messages to the user. All these in order to make my app multi-language prepared. I thought this way: "I have default strings for everything. Then I try to load a language.ini file and overwrite every string in the string table with the ones that I read from the ini file. This way if the ini file is incomplete, I won't have textless controls or messages" My problem is that I don't know how to : a) Modify (IF POSSIBLE?) a string stored in a string table b) Use a string from the string table as a parameter to a function that requires one. For example for MessageBox. Thank you. PS: One way to do b) that I found is: CString test; test.LoadString(IDS_STOP); MessageBox(test,"abc",MB_OK); Only I fear that there is a simpler way.

        J Offline
        J Offline
        John R Shaw
        wrote on last edited by
        #3

        On the MSDN CD is a book on internationalization (a newer version of the same book was released by Microsoft Press earlier this year). There are also articles at codeproject on internationalization. KEY WORD: internationalization Good luck! INTP

        A 1 Reply Last reply
        0
        • J John R Shaw

          On the MSDN CD is a book on internationalization (a newer version of the same book was released by Microsoft Press earlier this year). There are also articles at codeproject on internationalization. KEY WORD: internationalization Good luck! INTP

          A Offline
          A Offline
          andreir23
          wrote on last edited by
          #4

          Thank you! Seems to work... I found a lot of info. PS: What does INTP mean anyway? Couldn't find it in the acronym finder.

          J 1 Reply Last reply
          0
          • A andreir23

            Thank you! Seems to work... I found a lot of info. PS: What does INTP mean anyway? Couldn't find it in the acronym finder.

            J Offline
            J Offline
            John R Shaw
            wrote on last edited by
            #5

            andreir23 wrote: What does INTP mean anyway? From: personalitypage.com "Logical, original, creative thinkers. Can become very excited about theories and ideas. Exceptionally capable and driven to turn theories into clear understandings. Highly value knowledge, competence and logic. Quiet and reserved, hard to get to know well. Individualistic, having no interest in leading or following others." INTP

            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