Waiting Animation control

Waiting Animation control

This article was submitted .

This simple control is a subclassed STATIC Windows control, which displays an animation similar to the Windows Vista spinning wheel cursor animation.

To use it, place a static control (label) on your dialog.
Add a member variable to your dialog implementation file...

CWaitingAnimCtrl m_ctlWaiting
In the OnInitDialog() event handler, add the following line:
  LRESULT OnInitDialog(UINT /*uMsg*/, 
                       WPARAM /*wParam*/, 
                       LPARAM /*lParam*/, 
                       BOOL& /*bHandled*/)

Start the animation with the Start method.
Set the animation speed with the SetAnimDelay method.

Source Code Dependencies

Microsoft Visual C++ 6.0
Microsoft WTL 7.0 Library

Download Files

DownloadSource Code (22 Kb)