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. Update Dialog

Update Dialog

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestionannouncement
4 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.
  • K Offline
    K Offline
    Karavaev Denis
    wrote on last edited by
    #1

    Hi everyone. I have Dialog based app with listbox on it. In the second modal dialog i'm entering some data to editbox. Can anybody show me how to add string with text from editbox(from modal dlg) to the lisbox on main dlg? Thanks.

    J T 2 Replies Last reply
    0
    • K Karavaev Denis

      Hi everyone. I have Dialog based app with listbox on it. In the second modal dialog i'm entering some data to editbox. Can anybody show me how to add string with text from editbox(from modal dlg) to the lisbox on main dlg? Thanks.

      J Offline
      J Offline
      jmkhael
      wrote on last edited by
      #2

      ok, object oriented way: Write a function that takes a string and add it to ur listbox in the main dialo Pass a pointer to the other dialog of ur main dialog and call the function To pass the pointer u can do it when constructing the dialog as parameter to its constrctor, and there u cast it to the main dialog class pointer and store it in a member in the second dialog ( its type pointer to main dialog ) Hope this help Papa Murex Co. while (TRUE) Papa.WillLove ( Bebe ) ;

      K 1 Reply Last reply
      0
      • K Karavaev Denis

        Hi everyone. I have Dialog based app with listbox on it. In the second modal dialog i'm entering some data to editbox. Can anybody show me how to add string with text from editbox(from modal dlg) to the lisbox on main dlg? Thanks.

        T Offline
        T Offline
        Tomasz Sowinski
        wrote on last edited by
        #3

        You have at least two options: 1) The dialog with edit box has pointer listbox in parent dialog. It uses CListBox::AddString to add string 2) main dialog invokes secondary dialog with edit box. Secondary dialog maps string variable to edit box. When CEditDlg::DoModal returns IDOK, then main dialog adds string using CListBox::AddString Tomasz Sowinski -- http://www.shooltz.com

        *** Vodka. Connecting people. ***

        1 Reply Last reply
        0
        • J jmkhael

          ok, object oriented way: Write a function that takes a string and add it to ur listbox in the main dialo Pass a pointer to the other dialog of ur main dialog and call the function To pass the pointer u can do it when constructing the dialog as parameter to its constrctor, and there u cast it to the main dialog class pointer and store it in a member in the second dialog ( its type pointer to main dialog ) Hope this help Papa Murex Co. while (TRUE) Papa.WillLove ( Bebe ) ;

          K Offline
          K Offline
          Karavaev Denis
          wrote on last edited by
          #4

          Can I use standart: CMainDlg: CListBox list; CModalDlg: CMainDlg* mDl mDl->list.AddString("blablabla"); ?? such thing make no errors, but didn't work ...

          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