Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Verbose Output 1

Status
Not open for further replies.

williamu

Programmer
Apr 8, 2002
494
GB
Hi,

I have an application that will take some time to complete its process. So I would like to display a dialog box with an edit control (or similar) and post messages to this dialog as the process progress, and ideally be able to save the results to a file.

E.G.
Scanning Donors...
8843 Donors scanned.
Scanning Recipients...
12293 Recipients scanned.
Matching blood types...
blah blah...

However, my sad attempt at this simply replaces the previous message with the new one. Not what I want, I'd like to have the previous messages remain in the window.

Is there a way I can do this? Any help would be appreciated.

William
Software Engineer
ICQ No. 56047340
 
sure there is a way, GetDlgItemText followed by strcat (or similar in a language i don't know) followed by SetDlgItemText must do the trick.

I understand you are making a sort of console. I have done that using a listbox instead of an edit control. You can just add the additional text as the last line in the listbox, make sure it is visble when you add it. When there are too many lines in it you can delete the first line with every line you're adding. Works fine.


Marcel
 
Hi Marcel,

I'd actually thought about the strcat() option after posting the thread. But I thought it was a bit clumsy. But I do like the idea of the listbox, that's quite cunning so have a star.

--
Thanks.

William.
 
But I thought it was a bit clumsy" --> agree, but I don't know any other way
"that's quite cunning so have a star" --> thank you


Marcel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top