Home / Tips / VC++ Tips / VC++: How to create a colored or animated cursor?

“Chishiki” is Japanese for “knowledge.” e-chishiki.com aims to bring software developers, information security professionals, IT executives and other IT pros a rich body of knowledge in the form of articles, interviews, tutorials and technical discussions. Our contributors are among the biggest names in the Indian IT industry and include noted authors, educators and practitioners.

VC++: How to create a colored or animated cursor?


How to create a colored or animated cursor?


We cannot create a colored cursor in Resource Editor. To create it we need an editor called Image Editor which comes as a sample in VC++ 5.0 CD. It provides all the drawing tools and color palette using which we can draw the cursor. Save it as '.cur' file. Now, we can import it in our application by selecting Insert | Resource | Cursor and then selecting the '.cur' file. Load it using LoadCursor( ) and display it using AfxRegisterWndClass( ).
To create animated cursor we need an editor called 'aniedit' which is given in VC++ 5.0 CD. Create different frames in the editor and save these frames in an '.ani' file. Load the cursor using ::LoadCursorFromFile( ) and pass the handle returned by this function to AfxRegisterWndClass( ) function.

Comments

Log in or create a user account to comment.

On Sale From April 2008

Let Us C
8th Ed.
C programming classic & best seller. 1 million+ copies sold!

Y. Kanetkar

On Sale From April 2008

Introduction to Object Oriented Programming & C++

Y. Kanetkar

On Sale From Fall 2008

Microsoft .NET Framework: Web Application Security

Vijay Mukhi

On Sale From Nolvember 2008

Quest C++ Courseware
12+ hours of instructional audio and animated slides.

Y. Kanetkar Asang Dani

On Sale From November 2008

A Programmer's Guide to Web Application Security

Vijay Mukhi

Latest Forum Posts