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. EDIT BOX PROBLEMS

EDIT BOX PROBLEMS

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

    I've two separate dialogs (Dialog1,Dialog2), each having its own class. Dialog1 has an Edit box which I need to write to, from Dialog2. In Dialog1 I normally use CString Status; GetDlgItemText(IDC_EXIT_BOX_ONE, STATUS); SetDlgItemText(IDC_EDIT_BOX_ONE, "TEST APPLICATION"); However If I do the very same in Dialog2 nothing appears in the Edit box of Dialog1. Any Suggestions. (Note required to use GetDlgItemText to maintain all information on the Edit box) Kind Regards Caoimh

    P 1 Reply Last reply
    0
    • C Caoimh

      I've two separate dialogs (Dialog1,Dialog2), each having its own class. Dialog1 has an Edit box which I need to write to, from Dialog2. In Dialog1 I normally use CString Status; GetDlgItemText(IDC_EXIT_BOX_ONE, STATUS); SetDlgItemText(IDC_EDIT_BOX_ONE, "TEST APPLICATION"); However If I do the very same in Dialog2 nothing appears in the Edit box of Dialog1. Any Suggestions. (Note required to use GetDlgItemText to maintain all information on the Edit box) Kind Regards Caoimh

      P Offline
      P Offline
      Prakash Nadar
      wrote on last edited by
      #2

      How will it work??? IDC_EXIT_BOX_ONE is a dialog item of the other dialog. to do this you need to have the pointer of the other dialog CDialog1 *pDlg1; so from the second dialog //in CDialog2 you say pDlg1->GetDlgItemText(IDC_EXIT_BOX_ONE, STATUS); pDlg1->SetDlgItemText(IDC_EDIT_BOX_ONE, "TEST APPLICATION");


      1.Why do people not wearing a wrist watch look at their wrist for time when people ask for time. 2.Why do people ask for time from people who are not wearing a wrist watch. Prakash, India.

      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