Custom Animated Cursor
Hey, i was wondering if i could use a custom animated cursor in my program. i'm 99.99% positive i can, so how? lol i've tried making the cursor .cur and .ani and i've also tried this code:
code in .rc file:
wc.hCursor = LoadCursor(hInstance, MAKEINTRESOURCE(IDC_SHIBBY_CUR));
wc.hCursor = LoadCursor(GetModuleHandle(NULL), MAKEINTRESOURCE(IDC_SHIBBY_CUR));
code in header:
IDC_CUSTOMCUR CURSOR "drip.(cur/ani)" (respectively)
and my compiler spits out the error "cursor file 'drip.ani' does not contain cursor data" but yet, i'm using the cursor right now in windows as my "normal" cursor. thanks
#define IDC_CUSTOMCUR 1001
Are you cursors in the same dir as your Resource.rc?
I'm guessing you found a bug in your resource compiler. A search on the error text brings up this code:
Possibly, the type field for an animated cursor is not 2. You could check this with a hex editor, and if it proves to be the problem, report it as a bug.
/* A cursor file is basically an icon file. The start of the file
is a three word structure. The first word is ignored. The
second word is the type of data. The third word is the number of
get_word (e, real_filename);
type = get_word (e, real_filename);
count = get_word (e, real_filename);
if (type != 2)
fatal (_("cursor file `%s' does not contain cursor data"), real_filename);
In the meantime, you could bypass the resource compiler by using the LoadCursorFromFile function.