CTaskDialog::SetProgressBarMarquee
設定 CTaskDialog 之跑馬燈並將其加入至 對話方塊。
void SetProgressBarMarquee(
BOOL bEnabled = TRUE,
int nMarqueeSpeed = 0
);
參數
[in] bEnabled
啟用跑馬燈的TRUE ;停用跑馬燈並移除它的 FALSE 從 CTaskDialog。[in] nMarqueeSpeed
表示跑馬燈的速度的整數。
備註
跑馬燈在 CTaskDialog 類別的主要文字下方。
使用 nMarqueeSpeed 設定跑馬燈的速度,較大的值表示較數值。 值為 0 nMarqueeSpeed 進行跑馬燈無法移動以 Windows Vista預設的速度。
如果 nMarqueeSpeed 小於 0,則這個方法會擲回。 ENSURE (MFC) 巨集的例外狀況。
範例
// TODO: Replace the strings below with the appropriate message,
// main instruction, and dialog title
CString message("This is an important message to the user.");
CString mainInstruction("Important!\nPlease read!");
CString title("Alert Dialog");
CTaskDialog taskDialog(message, mainInstruction, title,
TDCBF_YES_BUTTON | TDCBF_NO_BUTTON | TDCBF_CANCEL_BUTTON );
// Add a marquee progress bar.
taskDialog.SetProgressBarMarquee();
taskDialog.DoModal();
// Remove the marquee bar and replace it with a standard progress bar
taskDialog.SetProgressBarMarquee(0);
taskDialog.SetProgressBarRange(0, 100);
taskDialog.SetProgressBarPosition(75);
taskDialog.SetProgressBarState();
taskDialog.DoModal();
需求
標題: afxtaskdialog.h
請參閱
參考
CTaskDialog::SetProgressBarPosition