CProgressCtrl::SetMarquee

Turns marquee mode on or off for the current progress bar control.

BOOL SetMarquee(
      BOOL fMarqueeMode, 
      int nInterval
);

Parameters

Parameter

Description

[in] fMarqueeMode

true to turn marquee mode on, or false to turn marquee mode off.

[in] nInterval

Time in milliseconds between updates of the marquee animation.

Return Value

This method always returns true.

Remarks

When marquee mode is turned on, the progress bar is animated and scrolls like a sign on a theater marquee.

This method sends the PBM_SETMARQUEE message, which is described in the Windows SDK.

Requirements

Header: afxcmn.h

This control is supported in Windows XP and later.

Additional requirements for this method are described in Build Requirements for Windows Vista Common Controls.

Example

The following code example defines the variable, m_progressCtrl, that is used to programmatically access the progress bar control. This variable is used in the next example.

 // Variable to access the progress control
    CProgressCtrl m_progressCtrl;

The following code example starts and stops the marquee scrolling animation.

// Turn the marquee animation on or off.
void CCProgressCtrl_s1Dlg::OnSetmarqueeOn()
{
    m_progressCtrl.SetMarquee(TRUE, nMarqueeInterval);
}

void CCProgressCtrl_s1Dlg::OnSetmarqueeOff()
{
    m_progressCtrl.SetMarquee(FALSE, nMarqueeInterval);
}

See Also

Concepts

CProgressCtrl Class

CProgressCtrl Members

Hierarchy Chart

PBM_SETMARQUEE

Using CProgressCtrl