Updating Edit Box real time

I'm writing an application in MS Visual C++, Ver 5.0.  Part of this application calls up a Dialog Box with a CheckBox and Edit Box. When the CheckBox is clicked, it reads an A/D port on a PC Board in the computer, and ultimately displays this value in the Edit Box once I've manipulated the raw data into something more meaningful.

My question is: How can I automate this process so that when the Dialog Box is called up, the Edit Box continually updates with new data?

Do I need to use a Timer and another subroutine, or is there a better way?
Thank-You!
dgoernerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mikeblasCommented:
> Do I need to use a Timer and another subroutine,

That's probably the most straightforward approach, sure.  Call SetTimer() to create a timer. When the timer message comes, get the value from your A/D port and massage it and display it.

If it takes a long time to massage the data, or if you'd have to block on the results from the A/D driver, you might want to use a separate thread.  In that case, the separate thread could run continuously--posting a message to the dialog when it has a new result to be displayed.

..B ekiM
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dgoernerAuthor Commented:
Hey mikeblas:
Thanks for answering my question so quickly!  I kind of figured that this would be the best approach, was hoping you'd come back and say something like "Oh yea....just type in this ONE command and it'll take care of everything!"
No such luck.

Will give it a whirl and let you know the results if you want?

Thanks again!

dgoerner
0
mikeblasCommented:
> No such luck.

Unfortunately, Windows has no UpdateSomeEditBoxFromMyADHardware() API.

 > Will give it a whirl and let you know the results if you want?

If you have follow-up questions, I'd be happy to answer 'em.

..B ekiM
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.