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. Passing data between a popup dialog and SDI

Passing data between a popup dialog and SDI

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

    Hi, Does anyone know how do i pass data bettwen a popup dialog and single documnet interface with splitter window? In my mainframe of SDI i wrote TestDlg* dlg = new TestDlg; dlg->DoModal(); From SDI how do i retrive data from the dialog box? Thanks

    R 1 Reply Last reply
    0
    • U User 404410

      Hi, Does anyone know how do i pass data bettwen a popup dialog and single documnet interface with splitter window? In my mainframe of SDI i wrote TestDlg* dlg = new TestDlg; dlg->DoModal(); From SDI how do i retrive data from the dialog box? Thanks

      R Offline
      R Offline
      RChin
      wrote on last edited by
      #2

      MaxiFire wrote: From SDI how do i retrive data from the dialog box? You can get the dialog data via its member variables. I see you are also creating the dialog dynamically, so you need to do this before deleting the dialog. For Example: Lets say your dialog retrieves some text and a number from the user. You need to instantiate the dialog, the user will fill in the information, then the SDI app will get this when the dialog is closed. My (untested) code would probably look like: int nNumber; CString strText; TestDlg* dlg = NULL; **//Create new dialog** dlg = new TestDlg; **// // If the user clicked the OK button // retrieve the input information //** if( dlg.DoModal() == IDOK ) { strText = dlg->m_strText; nNumber = dlg->m_nNumber; } **// clean up** delete dlg; **I Dream of Absolute Zero


      **

      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