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. All I want to do is update my dialog box!

All I want to do is update my dialog box!

Scheduled Pinned Locked Moved C / C++ / MFC
questionannouncement
6 Posts 4 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.
  • Z Offline
    Z Offline
    Zero_G
    wrote on last edited by
    #1

    I am trying to have a thread constantly update data in a dialog box, nothing is working! How do you constantly update data in a dialog box as other processes are running? DAVID

    B 2 N 3 Replies Last reply
    0
    • Z Zero_G

      I am trying to have a thread constantly update data in a dialog box, nothing is working! How do you constantly update data in a dialog box as other processes are running? DAVID

      B Offline
      B Offline
      bmzhao
      wrote on last edited by
      #2

      Add control type var,use SetWindowText() to change update data.

      1 Reply Last reply
      0
      • Z Zero_G

        I am trying to have a thread constantly update data in a dialog box, nothing is working! How do you constantly update data in a dialog box as other processes are running? DAVID

        2 Offline
        2 Offline
        224917
        wrote on last edited by
        #3

        How are you trying to update the dialog data from another thread. The suggested way is to post user defined messages with the parameter as new data to the dialog window, and write the message handler to update the dialog data itself.
        There is no spoon. suhredayan

        Z 1 Reply Last reply
        0
        • 2 224917

          How are you trying to update the dialog data from another thread. The suggested way is to post user defined messages with the parameter as new data to the dialog window, and write the message handler to update the dialog data itself.
          There is no spoon. suhredayan

          Z Offline
          Z Offline
          Zero_G
          wrote on last edited by
          #4

          I am attempting to post GPS coordinates from the GPS to the dialog box real time. A thread reads the GPS coordinates from the GPS unit and updates the current values in memory. Somehow I need to get those values to appear realtime in a dialog box!!!:mad:

          N 1 Reply Last reply
          0
          • Z Zero_G

            I am attempting to post GPS coordinates from the GPS to the dialog box real time. A thread reads the GPS coordinates from the GPS unit and updates the current values in memory. Somehow I need to get those values to appear realtime in a dialog box!!!:mad:

            N Offline
            N Offline
            namaskaaram
            wrote on last edited by
            #5

            maybe not real time but somewhere close to that ..... u can use timer function triggerd very millisecond!!!!! well like said before u can define a variable like "BOOL m_update"(or something like that) and whenever this thread of ur is getting updating the data u can set the "m_update"..... since the timer is set every millisecond u can give a code that check if m_update is set or not and based on that update the datavariables to the dialog box.....and then use the command "UpdateDatA(FALSE)" to update that to the screen..... ofcourse the best way again would be to use the PostMessage option.....to update the dialog rather than using the timer function..... if u can make ur question a little more clear.....maybe i can hlp...... hope this helpz u out!!!!! happy programming..... cheerz :-D

            1 Reply Last reply
            0
            • Z Zero_G

              I am trying to have a thread constantly update data in a dialog box, nothing is working! How do you constantly update data in a dialog box as other processes are running? DAVID

              N Offline
              N Offline
              namaskaaram
              wrote on last edited by
              #6

              maybe not real time but somewhere close to that ..... u can use timer function triggerd very millisecond!!!!! well like said before u can define a variable like "BOOL m_update"(or something like that) and whenever this thread of ur is getting updating the data u can set the "m_update"..... since the timer is set every millisecond u can give a code that check if m_update is set or not and based on that update the datavariables to the dialog box.....and then use the command "UpdateDatA(FALSE)" to update the dialog contents to the screen..... ofcourse the best way again would be to use the PostMessage option.....to update the dialog rather than using the timer function..... if u can make ur question a little more clear.....maybe i can hlp...... hope this helpz u out!!!!! happy programming..... cheerz :-D

              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