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 to get the text of edit ctrl from first dialog box in second dialog box?

How to get the text of edit ctrl from first dialog box in second dialog box?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
2 Posts 2 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
    my match
    wrote on last edited by
    #1

    in dialog base application i used two modal dialog boxes in first dialog box i using two text boxes where i entered username and password and do modal the second dialog where i want to used this values in second dialog box but when i used getdlgitemtext() and getwindowtext() from second dialog box it giving the blank values can any one tell me how to get the values of edit box in second dialog box class Thanks

    S 1 Reply Last reply
    0
    • M my match

      in dialog base application i used two modal dialog boxes in first dialog box i using two text boxes where i entered username and password and do modal the second dialog where i want to used this values in second dialog box but when i used getdlgitemtext() and getwindowtext() from second dialog box it giving the blank values can any one tell me how to get the values of edit box in second dialog box class Thanks

      S Offline
      S Offline
      Steen Krogsgaard
      wrote on last edited by
      #2

      Before calling DoModal on the second dialog, get the values from the edits in the first dialog, put them in member variabels of the second dialog class and call DoModal. In the second dialog's OnInitDialog you can the get the values from the member variables. There is no way to directly get the values from the first dialog while in the second dialog by using GetDlgItemText() and likes - the edit controls are simply not controls of the second dialog! Cheers Steen. "To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"

      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