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. initialization text on dialog box

initialization text on dialog box

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 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.
  • S Offline
    S Offline
    Shah Satish
    wrote on last edited by
    #1

    Hi.. I have created one dialog box and now i want to initialize text on my dialog box.. How can i initilaze my data on dialog box ? MY code is.. BOOL Exchanger::OnInitDialog(void) { // m_ExchListbox.AddString(_T("Hello")); static char m_myarray [] = { "Exchanger-Double end\n" "Exchanger-single end\n" "Exchanger-Double end kettle\n" "Exchanger-Single end kettle\n" "Exchanger-Super\n" "Exchanger-Process Flow\n" }; CDialog::OnInitDialog(); return 0; } Thanking you.. Shah

    T H T 3 Replies Last reply
    0
    • S Shah Satish

      Hi.. I have created one dialog box and now i want to initialize text on my dialog box.. How can i initilaze my data on dialog box ? MY code is.. BOOL Exchanger::OnInitDialog(void) { // m_ExchListbox.AddString(_T("Hello")); static char m_myarray [] = { "Exchanger-Double end\n" "Exchanger-single end\n" "Exchanger-Double end kettle\n" "Exchanger-Single end kettle\n" "Exchanger-Super\n" "Exchanger-Process Flow\n" }; CDialog::OnInitDialog(); return 0; } Thanking you.. Shah

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

      use SetWindowText() on each control you like ...


      Don't know where to start ?
      Refer the Forums Guidelines and ask a friend

      [VisualCalc 3.0][Flags Beginner's Guide]

      S 1 Reply Last reply
      0
      • S Shah Satish

        Hi.. I have created one dialog box and now i want to initialize text on my dialog box.. How can i initilaze my data on dialog box ? MY code is.. BOOL Exchanger::OnInitDialog(void) { // m_ExchListbox.AddString(_T("Hello")); static char m_myarray [] = { "Exchanger-Double end\n" "Exchanger-single end\n" "Exchanger-Double end kettle\n" "Exchanger-Single end kettle\n" "Exchanger-Super\n" "Exchanger-Process Flow\n" }; CDialog::OnInitDialog(); return 0; } Thanking you.. Shah

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        You can set your text of property window of dialog


        WhiteSky


        S 1 Reply Last reply
        0
        • S Shah Satish

          Hi.. I have created one dialog box and now i want to initialize text on my dialog box.. How can i initilaze my data on dialog box ? MY code is.. BOOL Exchanger::OnInitDialog(void) { // m_ExchListbox.AddString(_T("Hello")); static char m_myarray [] = { "Exchanger-Double end\n" "Exchanger-single end\n" "Exchanger-Double end kettle\n" "Exchanger-Single end kettle\n" "Exchanger-Super\n" "Exchanger-Process Flow\n" }; CDialog::OnInitDialog(); return 0; } Thanking you.. Shah

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

          Shah Satish wrote:

          CDialog::OnInitDialog();

          do you what ever you want but do it after CDialog::OnInitDialog()

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

          cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you

          S 1 Reply Last reply
          0
          • T toxcct

            use SetWindowText() on each control you like ...


            Don't know where to start ?
            Refer the Forums Guidelines and ask a friend

            [VisualCalc 3.0][Flags Beginner's Guide]

            S Offline
            S Offline
            Shah Satish
            wrote on last edited by
            #5

            Thank you for your reply.. My code is like... CDialog::OnInitDialog(); m_ExchListbox.AddString(_T("Exchanger-Double end")); m_ExchListbox.AddString(_T("Exchanger-Single end")); m_ExchListbox.AddString(_T("Exchanger-Double end kettle")); m_ExchListbox.AddString(_T("Exchanger-Single end kettle")); m_ExchListbox.AddString(_T("Exchanger-Super")); m_ExchListbox.AddString(_T("Exchanger-Process Flow")); Is it possible to declare it in array ?? i.e something like this.. static char m_myarray [] = { "Exchanger-Double end\r\n" "Exchanger-single end" "Exchanger-Double end kettle\n" "Exchanger-Single end kettle\n" "Exchanger-Super\n" "Exchanger-Process Flow\n" }; and then i can call through m_ExchListbox.AddString(m_myarray); ( but here addstring ( it will take only Cstring not char.. i tires with char then its showing me error) Is it possible to declare through array ?? Thanks a lot.. Shah

            1 Reply Last reply
            0
            • H Hamid Taebi

              You can set your text of property window of dialog


              WhiteSky


              S Offline
              S Offline
              Shah Satish
              wrote on last edited by
              #6

              Hi..Thanks for your help.. If possible then can u give me favor of my above question?? Shah

              1 Reply Last reply
              0
              • T ThatsAlok

                Shah Satish wrote:

                CDialog::OnInitDialog();

                do you what ever you want but do it after CDialog::OnInitDialog()

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

                cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you

                S Offline
                S Offline
                Shah Satish
                wrote on last edited by
                #7

                Hi..Thanks for your help.. If possible then can u give me favor of my above question?? Shah

                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