ProgressStatus Example for C++ 6.0 and later
MSG msg;
CString szStatus;
// are there any messages in the queue (like a button being pressed) ?
while( PeekMessage(&msg,NULL, 0, 0, PM_REMOVE) )
{
TranslateMessage( &msg ); /* Translates virtual key codes. */
DispatchMessage( &msg ); /* Dispatches message to window. */
}
if( !m_pDlg->m_bQuit ) // Look for the Click on the LEAD Control to Quit
{
szStatus.Format("Loading...%d%%", nPercent);
m_pDlg->SetWindowText(szStatus);
}
else
m_pDlg->m_pLEADDicomDS->EnableProgressEvent = FALSE; // Cancel the task