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 Update the Dialog in SDI

How to Update the Dialog in SDI

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

    created an SDI application, made a Dialog , Connected to the Database using ADO, retrieved the data in CString, but they are not shown in Dialog (Edit Box), I tried UpdateData(), nothing How to do this?

    R 1 Reply Last reply
    0
    • E Exceter

      created an SDI application, made a Dialog , Connected to the Database using ADO, retrieved the data in CString, but they are not shown in Dialog (Edit Box), I tried UpdateData(), nothing How to do this?

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

      Exceter wrote: retrieved the data in CString I suppose this is the CString from the edit box ? Exceter wrote: I tried UpdateData(), Did you try UpdateData(TRUE) or UpdateData(FALSE) ? ~RaGE();

      E 1 Reply Last reply
      0
      • R Rage

        Exceter wrote: retrieved the data in CString I suppose this is the CString from the edit box ? Exceter wrote: I tried UpdateData(), Did you try UpdateData(TRUE) or UpdateData(FALSE) ? ~RaGE();

        E Offline
        E Offline
        Exceter
        wrote on last edited by
        #3

        I tried both of them UpdateData(TRUE) and UpdateData(FALSE) my CString (CString MyStr) object is of EditBox. I checked the MyStr with AfxMessageBox, it catches the data

        R 1 Reply Last reply
        0
        • E Exceter

          I tried both of them UpdateData(TRUE) and UpdateData(FALSE) my CString (CString MyStr) object is of EditBox. I checked the MyStr with AfxMessageBox, it catches the data

          R Offline
          R Offline
          Rage
          wrote on last edited by
          #4

          Exceter wrote: I checked the MyStr with AfxMessageBox, it catches the data :confused: very odd ... well I'm not 100% sure about it since I always work with controls, never with straight values, but UpdateData(FALSE) should have done it. Try to create a control member data m_EditBox with the class wizard, and set the text with m_EditBox.SetWindowText(MyStr);. If it is still not updating it, then the display refreshing must hang in another part of your code. (You could also first try a RedrawWindow() after the UpdateData(FALSE)). ~RaGE();

          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