One more cursor question...

One more cursor question...

Post by Maur » Sun, 22 Jun 2003 18:58:36



Hi all,

I have tried to use API function LoadCursorFromFile(...)
Then I have a cursor handle. But how can I replace an existing cursor with
my own ?

Thanks in advance,
Marius

 
 
 

One more cursor question...

Post by Hans Galem » Sun, 22 Jun 2003 22:14:09



> I have tried to use API function LoadCursorFromFile(...)
> Then I have a cursor handle. But how can I replace an existing cursor with
> my own ?

Please supply a more adequate Subject.

Harold Howe, Q: Change the mouse cursor:

http://www.bcbdev.com/faqs/faq24.htm

Hans.

 
 
 

One more cursor question...

Post by Maur » Mon, 23 Jun 2003 02:22:13


Hans,

as you can see in your link there is an explanation of cursor handling from
a resource file (.res).
I have a .cur file for my cursor.
But when I have loaded this file what I should do to replace the arrow
cursor with my new cursor?

Thanks,
Mauro




> > I have tried to use API function LoadCursorFromFile(...)
> > Then I have a cursor handle. But how can I replace an existing cursor
with
> > my own ?

> Please supply a more adequate Subject.

> Harold Howe, Q: Change the mouse cursor:

> http://www.bcbdev.com/faqs/faq24.htm

> Hans.

 
 
 

One more cursor question...

Post by Hans Galem » Mon, 23 Jun 2003 04:16:23



> as you can see in your link there is an explanation of cursor handling from
> a resource file (.res).
> I have a .cur file for my cursor.
> But when I have loaded this file what I should do to replace the arrow
> cursor with my new cursor?

From:

Quote:>>Harold Howe, Q: Change the mouse cursor:

>>http://www.bcbdev.com/faqs/faq24.htm

Screen->Cursors[crMyCustomCursor]=LoadCursor((void*) HInstance,"CURSOR1");

Untested: can't you change that to something like:

Screen->Cursors[crMyCustomCursor]=LoadCursorFromFile( ..... );

Hans.