Creating a Cancel Dialog for lengthy operations
Posted on 2000-01-05
I'm trying to create a dialog that alows to cancel a running report generation.
I've tried alreade to do this with both of the AfxTreads (work thread and UI tread) but always with the result, that the dialog only appears after the report is sucessfully created and displayed in the dialog.
The calling sequence was as follows in the InitInstance() method of the dialog:
//Create Working Dialog
CWorkThread* pWorkThread = (CWorkThread*) AfxBeginThread(RUNTIME_CLASS(CWorkThread));
//Create the desired report
return TRUE; // Here ends the init dialog
Does anyone know a better way to do this or maybe the mistake I did?
Thanks for your help