Carry out the following steps:
- Build a dialog-based application through AppWizard.
- Add a picture control from the control tool bar into the dialog box in the Resource Editor.
- Change the properties of the Picture Control: Change the ID of picture control from default ID_STATIC to some other ID, say, ID_PICTURE. Also select ‘Icon’ from the Type option.
- Copy the ‘.ani’ file you wish to play into your project.
Create a control variable, m_picture of type CStatic for the inserted picture control through Class Wizard.
Add following code in OnInitDialog( ) :
HCURSOR cursor ;
cursor = ::LoadCursorFromFile ( “Globe.ani” ) ;
m_picture.SetCursor ( cursor ) ;