2/12/2004

使用IE5内建的进度对话框

本来想自己写一个的,但是发现codeproject上面[url=http://www.codeproject.com/miscctrl/iprogressdialog.asp]已经有了[/url]
[img]http://www.codeproject.com/miscctrl/IProgressDialog/IProgressDialog.gif[/img]
下面是微软知识库里面的一个示例CoInitialize(NULL);
IProgressDialog *pProgressDialog;
CoCreateInstance( CLSID_ProgressDialog, NULL, CLSCTX_ALL, IID_IProgressDialog, (LPVOID*)&pProgressDialog);
pProgressDialog->SetTitle(L"Testing...");pProgressDialog->SetCancelMsg(L"Cancelling...",NULL);
pProgressDialog->StartProgressDialog(NULL, NULL, PROGDLG_NOMINIMIZE, NULL);
Sleep(100);
int i;for(i=0;i<100;i++)>HasUserCancelled()) break; pProgressDialog->SetProgress(i,100); Sleep(100); }
pProgressDialog->StopProgressDialog();
pProgressDialog->Release();
CoUninitialize();
相关链接Knowledge Base [http://support.microsoft.com/?kbid=260222]Q260222 BUG: PROGDLG_NOMINIMIZE Flag in IProgressDialog::StartProgressDialog() Has No Effect [/url]

No comments: