I am using an IProgressDialog object to reflect the progress during a long operation. Through experimentation, I've noticed that the Cancel button is not responsive if I pass a non-NULL handle as the parent to the progress dialog. And, if I try to move the dialog, it will not work. It doesn't matter if I use a marquee style or a stepped style. Here's some sample code...

UIProgressDialog ProgressDlg;

ProgressDlg.Init ();
ProgressDlg.SetTitle (_T("Sample Title"));
//xxxProgressDlg.StartProgressDialog (m_hWnd, UIProgressStyle::UIPS_Marquee);
ProgressDlg.StartProgressDialog (m_hWnd);
ProgressDlg.SetCancelMessage (_T("Cancelling..."));
ProgressDlg.SetLineText (1, _T("Line 1 of text"), FALSE);
ProgressDlg.SetLineText (2, _T("Line 2 of text"), FALSE);
ProgressDlg.SetLineText (3, _T("Line 3 of text"), FALSE);

for (int i=0; i<1000; i++)
		CString msg;
			if (ProgressDlg.HasUserCancelled()) break;
		msg.Format ("I'm processing item %d", i);
		ProgressDlg.SetLineText (2, msg, FALSE);
		ProgressDlg.SetProgress(i, 1000);

ProgressDlg.StopProgressDialog ();
Is this by design? Is this a bug? Am I redirecting the progress dialog messaging by providing a handle to a parent dialog? The only way I can get it to work correctly, is to pass a NULL handle.