How to update CListBox
I'm new to mfc programming, and have a question... hope you can help me
I have a program that make some calculation, the user input some numbers and press a button to start.
When he press the button, the program start the calculations, and shows the results in a Clistbox as it arrives.
The problem is that when I use clistbox.addstring, the results are not automatically show in the clistbox, instead the user have to wait for all calculations to finish to see the results.
What can I do to show the results as soon as it arrives in the clistbox, and continues to do the calculations in the background??
Call a function to do the adding of the result to the listbox or have it do the the calculations in a function and return it for adding to the listbox. Either way, the result must be calculated and added to the list box before going on to the next item.
If you want it to show after every addition you need to have the CListBox paint itself. Invalidate it and send WM_PAINT.
Realize that this might slow your program down some.