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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. To assign string from String table to a controll's caption at design time?

To assign string from String table to a controll's caption at design time?

Scheduled Pinned Locked Moved C / C++ / MFC
questiondesign
6 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.
  • M Offline
    M Offline
    Mushtaque Nizamani
    wrote on last edited by
    #1

    Hi, This may be the odd question, but still i putting that, can string from string table can be assigned to a control's caption such as button or label at design time.

    Best Regards, Mushq Mushtaque Ahmed Nizamani Software Engineer Ultimus Pakistan "English is my second language; please excuse any grammatical or spelling mistakes"

    C 1 Reply Last reply
    0
    • M Mushtaque Nizamani

      Hi, This may be the odd question, but still i putting that, can string from string table can be assigned to a control's caption such as button or label at design time.

      Best Regards, Mushq Mushtaque Ahmed Nizamani Software Engineer Ultimus Pakistan "English is my second language; please excuse any grammatical or spelling mistakes"

      C Offline
      C Offline
      codeII
      wrote on last edited by
      #2

      CString cDlgItemTxt; cDlgItemTxt.LoadString( IDS_STRINGTABLEID ); GetDlgItem( ID_DLGITEM )->SetWindowText( cDlgItemTxt );

      M CPalliniC 2 Replies Last reply
      0
      • C codeII

        CString cDlgItemTxt; cDlgItemTxt.LoadString( IDS_STRINGTABLEID ); GetDlgItem( ID_DLGITEM )->SetWindowText( cDlgItemTxt );

        M Offline
        M Offline
        Mushtaque Nizamani
        wrote on last edited by
        #3

        koos slager wrote:

        CString cDlgItemTxt; cDlgItemTxt.LoadString( IDS_STRINGTABLEID ); GetDlgItem( ID_DLGITEM )->SetWindowText( cDlgItemTxt );

        the value is assigned to a control's caption at run time, but i am talking about at design time.

        Best Regards, Mushq Mushtaque Ahmed Nizamani Software Engineer Ultimus Pakistan "English is my second language; please excuse any grammatical or spelling mistakes"

        C N 2 Replies Last reply
        0
        • C codeII

          CString cDlgItemTxt; cDlgItemTxt.LoadString( IDS_STRINGTABLEID ); GetDlgItem( ID_DLGITEM )->SetWindowText( cDlgItemTxt );

          CPalliniC Offline
          CPalliniC Offline
          CPallini
          wrote on last edited by
          #4

          Wow! How did you accomplished all that at design time? :-D -- modified at 4:47 Tuesday 31st July, 2007

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

          In testa che avete, signor di Ceprano?

          1 Reply Last reply
          0
          • M Mushtaque Nizamani

            koos slager wrote:

            CString cDlgItemTxt; cDlgItemTxt.LoadString( IDS_STRINGTABLEID ); GetDlgItem( ID_DLGITEM )->SetWindowText( cDlgItemTxt );

            the value is assigned to a control's caption at run time, but i am talking about at design time.

            Best Regards, Mushq Mushtaque Ahmed Nizamani Software Engineer Ultimus Pakistan "English is my second language; please excuse any grammatical or spelling mistakes"

            C Offline
            C Offline
            codeII
            wrote on last edited by
            #5

            I’m sorry didn’t read your question very well. As far as I know it is impossible. Here you can read the Parameters you can pass to a control http://msdn2.microsoft.com/en-us/library/aa380902.aspx created in the resource. I tried to manually insert a string table Id, after reordering the resource (putting the string table before the dialog’s definition, but it didn’t work.

            1 Reply Last reply
            0
            • M Mushtaque Nizamani

              koos slager wrote:

              CString cDlgItemTxt; cDlgItemTxt.LoadString( IDS_STRINGTABLEID ); GetDlgItem( ID_DLGITEM )->SetWindowText( cDlgItemTxt );

              the value is assigned to a control's caption at run time, but i am talking about at design time.

              Best Regards, Mushq Mushtaque Ahmed Nizamani Software Engineer Ultimus Pakistan "English is my second language; please excuse any grammatical or spelling mistakes"

              N Offline
              N Offline
              Nelek
              wrote on last edited by
              #6

              Can't you go to the string table, select the string you want, control+c, and then control+v in the caption of your static?

              Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

              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