Currently, I create a CDialog derived class called CFileTRDialog, this dialog supposed to show the status
when I do some file transfer.
I have function like SetPercentageSent, SetFilesSent that I can call from other class which made use of the
dialog to feedback to it. So that the dialog can keep on updating the necessary info. Of course, there's also a
From the other class that made use of the CFileTRDialog, I created an object of it. So, whether I make it a
modal or modeless... it doesn't refresh refresh my input. For Modal, it definitely couldn't work as the data can
only be passed to the dialog when it's dismissed. For modeless, it doesn't refresh the data, irregardless of
how long the file transfer would take.
I traced through the code for updating the information in the CFileTRDialog and indeed it does update but it
doesn't show it those text fields.. I tried all ways..
AString = "something new";
SetDlgItemText(ID, "something new");
I supposed the graphics do not have time to update during IO, because when I put a AfxMessageBox("")
after one of the UpdateDate(FALSE). The dialog has no choice but to stop receiving data and maybe has
time to repaint the GUI. I thought of spawning a thread but do not know which function to make it a thread
function. Another alternative would be to throw all the sending and receiving into the dialog class which is not
very elegant way of programming.