Gamble
April 9th, 1999, 02:26 AM
This is troublesome...
I'm trying to create a simple modeless dialog to track the progress of a file processing function - it consists of a two static text controls and an icon. One of the text controls is updated by the function as it works to reflect the current directory. However... When I construct the dialog only the single text control appears, until every directory has been processed. After all this has been done, *then* the other line of text and the icon appear. The code I'm using is fairly simple:
// Reveal the modeless progress dialog
m_pScanDlg = new CScanningDialog;
m_pScanDlg->SetCurrentDir(szCurDir);
m_pScanDlg->ShowWindow(SW_SHOW);
//...
// Process and update dialog
//...
// Free up the progress dialog
delete m_pScanDlg;
SetCurrentDir() just updates the CString mapped to the text control and calls UpdateData() on the progress dialog. I'm really at a loss as to why this dialog isn't being fully displayed until its gone through all the directories. Can anyone tell me what I'm doing wrong?
I'm trying to create a simple modeless dialog to track the progress of a file processing function - it consists of a two static text controls and an icon. One of the text controls is updated by the function as it works to reflect the current directory. However... When I construct the dialog only the single text control appears, until every directory has been processed. After all this has been done, *then* the other line of text and the icon appear. The code I'm using is fairly simple:
// Reveal the modeless progress dialog
m_pScanDlg = new CScanningDialog;
m_pScanDlg->SetCurrentDir(szCurDir);
m_pScanDlg->ShowWindow(SW_SHOW);
//...
// Process and update dialog
//...
// Free up the progress dialog
delete m_pScanDlg;
SetCurrentDir() just updates the CString mapped to the text control and calls UpdateData() on the progress dialog. I'm really at a loss as to why this dialog isn't being fully displayed until its gone through all the directories. Can anyone tell me what I'm doing wrong?