LoadCursor for animated cursors in a compiled resource does not work? 
Author Message
 LoadCursor for animated cursors in a compiled resource does not work?

Hi all,

so far, I've always been loading animated cursor files via the
LoadCursorFromFile API. This worked fine, but I'd prefer storing the
animated cursors in the resource file.

I added them using the "CUSTOM" resource type, as the cursor resource
type won't recognize them as valid cursors. The first cursor has
resource ID 201.

The cursors just wont load. I tried all these variants:

LoadCursor(app.hinstance, "201")
LoadCursor(app.hinstance, CLng(201))
LoadCursor(app.hinstance, MAKEDWORD(201, 0))  '<MAKEDWORD is a
function that creates a DWORD from two longs for the loword and hiword
respectively.

I even assigned a name to the cursor file instead of a numerical ID,
still nogo.

LoadCursor(app.hinstance, "CURSOR1")

Any idea what's going on here?

Thanks!

- Balt



Tue, 01 Feb 2005 18:31:42 GMT  
 LoadCursor for animated cursors in a compiled resource does not work?
IRRC, animated cursors can only be loaded from file in Win9x. I store
them as custom binary resources and write them out to a tempfile. A
small class module works nicely for handling temp files since the
Class_Terminate event provides convenient place to delete the
tempfile.



Quote:
>so far, I've always been loading animated cursor files via the
>LoadCursorFromFile API. This worked fine, but I'd prefer storing the
>animated cursors in the resource file.

>I added them using the "CUSTOM" resource type, as the cursor resource
>type won't recognize them as valid cursors. The first cursor has
>resource ID 201.

>The cursors just wont load. I tried all these variants:

>LoadCursor(app.hinstance, "201")
>LoadCursor(app.hinstance, CLng(201))
>LoadCursor(app.hinstance, MAKEDWORD(201, 0))  '<MAKEDWORD is a
>function that creates a DWORD from two longs for the loword and hiword
>respectively.

>I even assigned a name to the cursor file instead of a numerical ID,
>still nogo.

>LoadCursor(app.hinstance, "CURSOR1")

>Any idea what's going on here?

>Thanks!

>- Balt

-Tom
(please post replies to the newsgroup)


Tue, 01 Feb 2005 21:24:22 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help With API Call LoadCursor (Cursor Resource File?)

2. Animated Cursors in resource file

3. Animated Cursors in resource file

4. colored CURsor and ANImated cursor files

5. Herlp: LIKE in SQL doe not work anymore

6. Databound combo control not working in compiled application

7. Program works in debugger, not when compiled

8. Help: a VB6 program compiled on Win95 does not work on NT4

9. OLE server -- works from VB but not after compile

10. ActiveX-dll works in VB project but not when compiled

11. Getsettings not working in compiled IIS app.

12. Compiled report with subreports does not work as it should

 

 
Powered by phpBB® Forum Software