Animated (*.ani) cursor not showing
-
Hi, I've created a animated cursor which is 32x32 RGB/A. I tried to load it in my project (VS6) but it's not loading. Here are the steps I've done plus some code: 1. I've add my cursor (named 'OrangeWait.ani') in res folder, 2. defined new ID for it in 'resource.h'
#define IDR_WAIT_CURSOR 124
3. added line in *.rc fileIDR_WAIT_CURSOR ANICURSOR "res\\OrangeWait.ani"
4. and added some code for testingHCURSOR hCWait = ::LoadCursor(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDR\_WAIT\_CURSOR)); if(!hCWait) { AfxMessageBox("Can't load Wait cursor!"); return; } HCURSOR hCStandard = ::LoadCursor(NULL,IDC\_ARROW); if(!hCStandard) AfxMessageBox("Can't load Standard cursor!"); SetCursor(hCWait); Sleep(3000); SetCursor(hCStandard);
When I start the app I get message "Can't load Wait cursor!". Any idea? Thanks...
-
Hi, I've created a animated cursor which is 32x32 RGB/A. I tried to load it in my project (VS6) but it's not loading. Here are the steps I've done plus some code: 1. I've add my cursor (named 'OrangeWait.ani') in res folder, 2. defined new ID for it in 'resource.h'
#define IDR_WAIT_CURSOR 124
3. added line in *.rc fileIDR_WAIT_CURSOR ANICURSOR "res\\OrangeWait.ani"
4. and added some code for testingHCURSOR hCWait = ::LoadCursor(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDR\_WAIT\_CURSOR)); if(!hCWait) { AfxMessageBox("Can't load Wait cursor!"); return; } HCURSOR hCStandard = ::LoadCursor(NULL,IDC\_ARROW); if(!hCStandard) AfxMessageBox("Can't load Standard cursor!"); SetCursor(hCWait); Sleep(3000); SetCursor(hCStandard);
When I start the app I get message "Can't load Wait cursor!". Any idea? Thanks...
Just worked out. It seems I forget to rebuild. Funny.
-
Just worked out. It seems I forget to rebuild. Funny.
It's odd!!! I've changed the animated cursor for another one and replace it. Rebuild and back to "Can't load Wait cursor!" message. I've double checked everything but no, still wont work. Now it seams as rebuilding isn't the issue here. I even try to go back but to my original ani cursor still can't load it?! Then I tried to import animated cursors in the following way: - On Insert Resources dialog box clicked Import - Imported my animated cursors - Specified 'ANICURSORS' as type, and clicked 'OK' , but this too didn't give desired result. The same msg displayed. Did anyone successfully added animated cursor (32x32 RGB/A) and got it to work in VS6? If so how?
-
It's odd!!! I've changed the animated cursor for another one and replace it. Rebuild and back to "Can't load Wait cursor!" message. I've double checked everything but no, still wont work. Now it seams as rebuilding isn't the issue here. I even try to go back but to my original ani cursor still can't load it?! Then I tried to import animated cursors in the following way: - On Insert Resources dialog box clicked Import - Imported my animated cursors - Specified 'ANICURSORS' as type, and clicked 'OK' , but this too didn't give desired result. The same msg displayed. Did anyone successfully added animated cursor (32x32 RGB/A) and got it to work in VS6? If so how?
I found the new way to succeed, only this lines of code do the job
HCURSOR hCursor = LoadCursorFromFile("res\\\\AnimatedCursor.ani"); if(hCursor) SetCursor(hCursor);
Off course 'AnimatedCursor.ani' is the name of my source file. But another problem appeared when running under release mode, cursor is not loading. Why? It's a little sadly when talking to my self, isn't it?
-
I found the new way to succeed, only this lines of code do the job
HCURSOR hCursor = LoadCursorFromFile("res\\\\AnimatedCursor.ani"); if(hCursor) SetCursor(hCursor);
Off course 'AnimatedCursor.ani' is the name of my source file. But another problem appeared when running under release mode, cursor is not loading. Why? It's a little sadly when talking to my self, isn't it?
Well I can get really stupid some times can I? The file needs to be distributed along with application or it can not find and load it. Obviously if I want it to work I need to go back and include my ani cursor in my resource. But I cant get it to show (see previous posts). Does anybody know the solution to my problem?